Exemplo n.º 1
0
        public void StartGame()
        {
            gamePlayScreen = new GamePlayScreen(this);
            currentScreen  = Screens.GamePlayScreen;

            startScreen    = null;
            gameOverScreen = null;
        }
Exemplo n.º 2
0
        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;
        }
Exemplo n.º 3
0
 public GameOverScreen(Game1 game, Texture2D texture, GamePlayScreen gamePlayScreen, int pX, int pY)
     : base(game, pX, pY)
 {
     this.setTexture(texture);
     this.gamePlayScreen = gamePlayScreen;
 }