// Use this for initialization
    void Awake()
    {
        if (!SaveDataManager.IsSaveDataExists())
        {
            SaveDataManager.CreatePlayerData();
        }
        SaveDataManager.LoadPlayerData();

        Debug.Log(PlayerDataRef.BestRecord[0]);
    }
示例#2
0
    public void LoadCharacter()
    {
        PlayerData dataToLoad = SaveDataManager.LoadPlayerData();

        if (dataToLoad != null)
        {
            currentPlayerData = dataToLoad;
        }
        else
        {
            Debug.Log("no save file found");
            return;
        }

        UpdateCharacterDisplay();

        startMenu.SetActive(false);
        characterDisplayPanel.SetActive(true);
    }
示例#3
0
 public void OnOpenGame()
 {
     saveDataManager.LoadInPersistent();
     saveDataManager.LoadPlayerData(true);
 }
 public void DeleteData()
 {
     SaveDataManager.DeleteData();
     SaveDataManager.CreatePlayerData();
     SaveDataManager.LoadPlayerData();
 }