Пример #1
0
 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());
     }
 }
Пример #2
0
    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);
    }
Пример #3
0
 public void UpdateScore()
 {
     //@todo: best score will get from save data
     bestScore.text = ": " + Util.NumberFormat(GameSave.GetInstance().GetBestScore());
     score.text     = ": " + Util.NumberFormat(0);
 }