private void QuitGame() { if (SoundManager.getInstance()) { SoundManager.getInstance().PlaySound(SoundId.QUIT); } if (GameSave.GetInstance()) { //todo: save best score with FireBase or other local GameSave.GetInstance().SetBestScore((int)GetScore()); } }
IEnumerator Init() { yield return(new WaitForSeconds(0.2f)); if (soundManager != null) { soundManager.PlaySound(SoundId.PLAYING, true); } txtBestScore.text = (GameSave.GetInstance() ? Util.NumberFormat(GameSave.GetInstance().GetBestScore()) : Util.NumberFormat(0)); UpdateFacebookUI(); Util.PlayAnim(btnPlay, btnPlay.transform.localScale, duration); }
public void UpdateScore() { //@todo: best score will get from save data bestScore.text = ": " + Util.NumberFormat(GameSave.GetInstance().GetBestScore()); score.text = ": " + Util.NumberFormat(0); }