示例#1
0
    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;
        }
    }
示例#2
0
 public void SaveGame()
 {
     SaveGameLoader.SaveGame(gameDataObject.getSaveGameData(), "Save1");
     Debug.Log("Saved to Save1");
 }