Esempio n. 1
0
 public static void SaveGame(bool autosave = false)
 {
     if (save.unlocks.HasAbility(Ability.Heal) && !autosave)
     {
         AlerterText.Alert("Rebuilding waveform");
         pc.FullHeal();
     }
     if (autosave)
     {
         AlerterText.AlertImmediate("Autosaving...");
     }
     save.currentHP        = pc.currentHP;
     save.maxHP            = pc.maxHP;
     save.currentEnergy    = pc.currentEnergy;
     save.maxEnergy        = pc.maxEnergy;
     save.basePlayerDamage = pc.baseDamage;
     save.playerPosition   = pc.transform.position;
     save.sceneName        = SceneManager.GetActiveScene().path;
     gc.GetComponentInChildren <MapFog>().SaveCurrentMap();
     gc.saveContainer.WriteToDiskSlot(saveSlot);
     if (autosave)
     {
         AlerterText.AlertImmediate("Autosave complete");
     }
 }