public override void Draw(Screen screen) { Position = screen.ToWorldPosition(InputManager.GetMousePosition()); screen.Draw( texture: Texture, position: screen.ToExactPosition(Position), layerDepth: LayerDepth, rotationAngle: RotationAngle, rotationOrigin: RotationOrigin, exactPosition: true ); if (Debug) // TODO move to screen TextureManager.Font.DrawText( screen.SpriteBatch, "X: " + Position.X + "; Y: " + Position.Y + ";", 12, screen.ToExactPosition(Position + new Vector2(0, 20)), Color.Red, LayerDepth + 0.01f, false ); }
public override void Draw(Screen screen) { if (_paused) { Position = screen.Size / 2 - _background.Size / 2; Vector2 tmpPosition = Position + new Vector2(75, 120); Vector2 tmpIncrement = new Vector2(0, 50); _background.Position = screen.ToWorldPosition(Position); _background.Draw(screen); for (int i = 1; i < MenuElements.Count; i++) { MenuElements[i].Position = tmpPosition; MenuElements[i].Draw(screen); tmpPosition += tmpIncrement; } } }
public void DrawMedal(Screen screen) { Size = TextureManager.GetTexture("gold").Bounds.Size.ToVector2(); Vector2 medalPosition = new Vector2(screen.ExactWidth - Size.X - 24, screen.ExactHeight - screen.ExactHeight); Position = screen.ToWorldPosition(medalPosition); if (CurrentMedal != Medal.None) { screen.SpriteBatch.Draw( texture: TextureManager.GetTexture(CurrentMedal.ToString().ToLower()), position: medalPosition, color: Color.White, layerDepth: LayerDepth ); } }