Esempio n. 1
0
 public override void _Ready()
 {
     instance = this;
     datas[0] = SavingAndLoading.LoadingGameSaveData(savePath + "0" + savePathEnd);
     datas[1] = SavingAndLoading.LoadingGameSaveData(savePath + "1" + savePathEnd);
     datas[2] = SavingAndLoading.LoadingGameSaveData(savePath + "2" + savePathEnd);
     SavingAndLoading.LoadingOptionsSaveData("user://Option.save");
     AllDataLoaded = true;
     SettingsOptions.RegisterUpdatedEvent(UpdateGameSettings);
 }
Esempio n. 2
0
 void Start()
 {
     SAL = this.GetComponent <SavingAndLoading>();
     if (SAL.CheckForSave())
     {
         print("File Found");
     }
     else
     {
         print("File Not Found");
         Destroy(LoadOption);
     }
     DontDestroyOnLoad(this);
 }
Esempio n. 3
0
 public void SaveGame(string location)
 {
     if (PlayerController.Instance != null)
     {
         Dictionary holder = WorldManager.instance.GetWorldInfo();
         AddToDic(holder, SavedData.SavedAreaPath, location);
         if (holder.Contains(SavedData.SavedGameName))
         {
             if (holder[SavedData.SavedGameName].Equals("New Game"))
             {
                 AddToDic(holder, SavedData.SavedGameName, "Save Game " + (dataUsed));
             }
         }
         SavingAndLoading.SavingGameData(savePath + (dataUsed).ToString() + ".save", PlayerController.Instance.upgrades.GetAllUpgrades(), holder
                                         , PlayersJournal.instance.scanNames);
         ToggleGamePause();
     }
 }
Esempio n. 4
0
 private void Applied()
 {
     SettingsOptions.ApplyNewSettings();
     SavingAndLoading.SavingOptionData("user://Option.save");
 }