예제 #1
0
 public void DisplayHighScore()
 {
     if (sc.GetGameActive() && gops.GetSave().highScore < Mathf.FloorToInt(Altar.GetTimeSinceStart()) && gops.GetMaxHealth() <= 250)
     {
         gops.GetSave().highScore = Mathf.FloorToInt(Altar.GetTimeSinceStart());
         SaveSystem.SaveGame(gops.GetSave().highScore, gops, ic, mp.GetChosenVolume(), Screen.currentResolution.width, Screen.currentResolution.height, QualitySettings.GetQualityLevel());
     }
     TMPHS.text = "BEST TIME: " + gops.GetSave().highScore + "\n\nPress " + ic.Reset + " to try again.";
 }
예제 #2
0
 private void SetHealthForPlayer()
 {
     if (!hasSetHealth && FindObjectOfType <Player>() && gops && gops.GetSave() != null)
     {
         gops.SetMaxHealth(gops.GetSave().defaultMaxHealth);
         playerunit = FindObjectOfType <Player>().gameObject.GetComponent <Unit>();
         playerunit.SetMaxHealth(gops.GetSave().defaultMaxHealth);
         playerunit.SetHealth(gops.GetSave().defaultMaxHealth);
         Debug.Log("player health set to " + playerunit.GetHealth());
         hasSetHealth = true;
     }
 }
예제 #3
0
 public void SaveSettings()
 {
     SaveSystem.SaveGame(gops.GetSave().highScore, gops, ic, mp.GetChosenVolume(), Screen.currentResolution.width, Screen.currentResolution.height, QualitySettings.GetQualityLevel());
     gops.LoadSaveData();
 }