Example #1
0
 private void lose(bool dead)
 {
     if (dead)
     {
         state.ChangeState(new YouLoseState(state));
     }
 }
Example #2
0
        public void Update(GameTime gameTime, InputHandler inputHandler)
        {
            collide.update(gameTime, inputHandler, resetRectangle);
            openGate = checkWin.hasWon();

            if (openGate)
            {
                rectangles.Remove(gateRectangle);
                if (checkWin.gotKey(actors, keyRectangle))
                {
                    Console.WriteLine("WIN");
                    state.ChangeState(new MainMenuState(state));
                }
            }
        }