Beispiel #1
0
    private static void CreateAndInit()
    {
        GameObject go = new GameObject("__SaveManager__", typeof(SaveManager)) as GameObject;

        DontDestroyOnLoad(go);
        _instance = go.GetComponent <SaveManager>();

        if (HolderSave.FilesaveExist())
        {
            _instance.Data = HolderSave.Load();
            Debug.LogError("LoadSuccess");
        }
        else
        {
            _instance.Data = new HolderSave();
            _instance.Data.Save();
            Debug.LogError("LoadFail");
        }

        _instance.Data.ApplyData();
    }
Beispiel #2
0
 public void UpdateData(HolderSave Save)
 {
     Config.PlayerData.UpdateData(Save.UpgradeProgress);
 }