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); } }
public void SetCurrentSaveDesc(Saves.SaveSlot saveSlot, string saveName) { mCurrentSaveDesc.slot = saveSlot; mCurrentSaveDesc.saveName = saveName; UnityEngine.Debug.Log("Set current save, slot: " + saveSlot.ToString() + ", name: " + saveName); }