static MouseCursor() { Position = Vector2.Zero; IsVisible = true; state = MouseCursorState.None; didLoadResources = false; currentCursor = null; cursorResources = null; }
public static void Render(GameTime gameTime) { if (!IsVisible) return; if (didLoadResources == false) LoadResources (); // If loading failed, then try again later if (didLoadResources == false) return; currentCursor = cursorResources [(int)state]; // "None" state will result in "null" for currentCursor if (currentCursor == null) return; Vector2 hotSpotOffset = Hotspot; currentCursor.Texture.RenderOnScreen (Position.X - hotSpotOffset.X, Position.Y - hotSpotOffset.Y); }