Esempio n. 1
0
        /// <summary>
        /// Starts a new game, getting rid of the menu, deleting old saves, and opening up the starting room.
        /// </summary>
        private void StartNewGame()
        {
            if (gameMenu != null)
            {
                gameMenu.Dispose();
                gameMenu = null;
            }

            DeleteSave();

            GameResources.RoomSaves = new List<RoomSaveData>();

            StaticBGM.SwitchMusic("Level");

            currentRoom = new Room("StartRoom", -1);
            player = new Player(gameContent, SaveGame, SwitchRooms, DisplayInfoBox);
            player.Spawn(currentRoom.SpawnLocation);
            gameHUD = new HUD(gameContent, player);
            gameHUD.DisplayRoomName(currentRoom.LongName);

            isPaused = false;
            inGame = true;
        }