所以,我想在我的光標前畫一個紋理。這裏是我的代碼:非靜態字段,方法或屬性'Microsoft.Xna.Framework.Input.MouseState.X.get'需要對象引用嗎?
private void DrawCursor()
{
//Draws cursor
Vector2 Mouseplace = new Vector2(MouseState.X, MouseState.Y);
spriteBatch.Draw(cursor, Mouseplace, Color.White);
}
而且我得到這個錯誤:
Error 1 An object reference is required for the non-static field, method, or property 'Microsoft.Xna.Framework.Input.MouseState.X.get' And this:
Error 2 An object reference is required for the non-static field, method, or property 'Microsoft.Xna.Framework.Input.MouseState.Y.get' How to fix those?
(很抱歉,如果這是一個noob問題)