示例#1
0
        private void CheckPlayerExitCollision()
        {
            if (Util.HasIntersection(Player, CurrentRoom.GetExitBounds()))
            {
                int nextRoomIndex = CurrentRoom.NextRoomIndex;

                if (nextRoomIndex < 0)
                {
                    Level.FinishLevel();
                    GameScreen.FinishLevel();
                    PauseGame();
                }
                else
                {
                    Level.SwitchCurrentRoom(nextRoomIndex);
                }
            }
        }