예제 #1
0
    // Start is called before the first frame update
    void Start()
    {
        Time.timeScale = 0f;

        if (status == GameOverStatus.Victory)
        {
            statusText.text  = victoryText;
            statusText.color = victoryColor;
        }
        else if (status == GameOverStatus.Defeat)
        {
            statusText.text  = defeatText;
            statusText.color = defeatColor;
        }

        stageCount.text   = GameTracking.stageCount + "";
        enemiesCount.text = GameTracking.enemySlainCount + "";
        fightsCount.text  = GameTracking.fightsWonCount + "";
        totalCount.text   = GameTracking.getTotalScore() + "";

        SaveOptions.isGameSaved = false;
        SaveSystem.SaveOptions();

        GameTracking.Reset();
        Shop.Reset();
        FindObjectOfType <Vault>().Reset();
        Heroes.Reset();
    }
예제 #2
0
 public void onResetClick()
 {
     SaveOptions.isGameSaved = false;
     SaveSystem.SaveOptions();
     GameTracking.Reset();
     Shop.Reset();
     MainMenu.DestroyStaticObjects();
     SceneManager.LoadScene("MainMenu", LoadSceneMode.Single);
 }