public void StartGame() { gamePlayScreen = new GamePlayScreen(this); currentScreen = Screens.GamePlayScreen; startScreen = null; gameOverScreen = null; }
public void EndGame(GamePlayScreen gamePlayScreen, int livesLeft) { Texture2D gameOverTexture; if (livesLeft <= 0) { gameOverTexture = Content.Load <Texture2D>("GameOverScreen"); } else { gameOverTexture = Content.Load <Texture2D>("GameOverScreen"); } gameOverScreen = new GameOverScreen(this, gameOverTexture, gamePlayScreen, getScreenWidth() / 2 - gameOverTexture.Width / 2, 20); currentScreen = Screens.GameOverScreen; gamePlayScreen = null; }
public GameOverScreen(Game1 game, Texture2D texture, GamePlayScreen gamePlayScreen, int pX, int pY) : base(game, pX, pY) { this.setTexture(texture); this.gamePlayScreen = gamePlayScreen; }