Esempio n. 1
0
        public void LoadSave(Saves.SaveSlot slot)
        {
            Saves.SaveGame saveGame;
            string         saveName = null;

            if (Saves.SaveManager.LoadSave(slot, ref saveName, out saveGame))
            {
                mCurrentSaveDesc.slot     = slot;
                mCurrentSaveDesc.saveName = saveName;

                mCurrentMapState      = saveGame.mMapState;
                mCurrentCardGameState = saveGame.mCardGameState;
                mCurrentCampaignState = saveGame.mCampaignState;

                // TODO card game should not be special cased like this - maybe?
                if (saveGame.mLoadScene == GameScene.CampaignCardGame ||
                    saveGame.mLoadScene == GameScene.CardGame)
                {
                    CardsSetupState setupState = new CardsSetupState(saveGame.mLoadScene == GameScene.CampaignCardGame, false);
                    SetPassedState(setupState);
                }
                MoveToNextScene(saveGame.mLoadScene);
            }
            else
            {
                UnityEngine.Debug.Log("Failed to load save: " + saveName);
            }
        }
Esempio n. 2
0
 public CampaignState LoadCampaignState()
 {
     if (mCurrentCampaignState == null)
     {
         mCurrentCampaignState = new CampaignState();
         mCurrentCampaignState.mCurrentCollection.mDeck = DefaultDeckSpec;
     }
     return(mCurrentCampaignState);
 }