/// <summary> /// Draw code of the program /// </summary> private void Draw() { window.Clear(); Score.Draw(window); if (gameState == GameState.Ready) { window.Draw(readyText); } if (gameState == GameState.Lose) { window.Draw(gameOverText); } grid.Draw(window); pacman.Draw(window); blinky.Draw(window); inky.Draw(window); pinky.Draw(window); clyde.Draw(window); window.Display(); }
//draws each of the four ghosts and adjust the image variation to what it should be public void GhostsDraw() { //The purpose of the Draw ghosts method is to loop through the ghosts calling their animate and then draw methods. foreach (Ghost ghost in allghosts) { ghost.animateddirection(); ghost.Draw(); } }
public void DrawGraphic() { using (var g = Graphics.FromImage(Background)) { this.DrawBackGround(g); this.DrawInterior(g); this.DrawDots(g); pacman.Draw(g); pinky.Draw(g); } }