示例#1
0
        private void LoadSave()
        {
            string[] temp = SaveModule.LoadSave();

            if (temp == null)
            {
                return;
            }

            if (temp[0] == GameState.CityMenu.ToString())
            {
                CleanGameState(GameState.CityMenu);
            }
            else if (temp[0] == GameState.InventoryMenu.ToString())
            {
                CleanGameState(GameState.InventoryMenu);
            }
            else if (temp[0] == GameState.MapMenu.ToString())
            {
                CleanGameState(GameState.MapMenu);
            }
            else if (temp[0] == GameState.TravelMenu.ToString())
            {
                if (temp[1] != null)
                {
                    TravelMenu.TurnsLeft   = int.Parse(temp[1]);
                    TravelMenu.Destination = temp[2];
                    CleanGameState(GameState.TravelMenu);
                }
                else
                {
                    CleanGameState(GameState.CityMenu);
                }
            }
            else
            {
                CleanGameState(GameState.CityMenu);
            }
        }
示例#2
0
 private void SaveGame()
 {
     SaveModule.GenerateSave(Player.Inventory, Player.Location, gameState.ToString());
 }