public void EndGame(int collectedCoins, string endString) { GameDatas.AddCollectedCoinsToBank(collectedCoins); GameDatas.EndGameMessage = endString; GameDatas.SaveData(); SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex - 1); }
public void QuitButtonAction() { GameDatas.SaveData(); Application.Quit(); }
public void PlayGameButtonAction() { GameDatas.SaveData(); SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1); }
private void OnApplicationQuit() { GameDatas.SaveData(); }