private void MazeGame_Paint(object sender, PaintEventArgs e) { maze.Draw(e.Graphics); if (player == null) { createPlayer(); } if (target == null) { createTarget(); } player.Draw(e.Graphics); target.Draw(e.Graphics); Font myFont = new Font("ComicSans", 24); SolidBrush brush = new SolidBrush(Color.Fuchsia); String message = "Level: {0}"; Point p = new Point(730, 10); e.Graphics.DrawString(String.Format(message, levelCount.ToString()), myFont, brush, p); }
private void DrawFrame() { Console.Clear(); MyWorld.Draw(); CurrentPlayer.Draw(); }