public void LoadGame() { SaveGameData loadedGameData = SaveGameLoader.LoadGame("Save1"); this.gameDataObject.playerGameCharacter = loadedGameData.playerGameCharacter; this.gameDataObject.partyList = loadedGameData.partyList; this.gameDataObject.treeStore.globalFlags = loadedGameData.globalFlags; this.gameDataObject.treeStore.SelectTree(loadedGameData.treeLink); ITree curTree = this.gameDataObject.treeStore.getCurrentTree(); switch (curTree.treeType) { case TreeType.World: SceneManager.LoadScene((int)UnitySceneIndex.World); break; case TreeType.Zone: SceneManager.LoadScene((int)UnitySceneIndex.Zone); break; } }
public void SaveGame() { SaveGameLoader.SaveGame(gameDataObject.getSaveGameData(), "Save1"); Debug.Log("Saved to Save1"); }