예제 #1
0
 private void AnimateScoreboard()
 {
     if (animationFrame != STOPPED)
     {
         if (animationFrame == FINAL_SCORE)
         {
             finalScore.gameObject.SetActive(true);
             finalScore.SetText(SCORE_PREFIX + new ScoreFormatter().Format(score));
             finalScore.Grow(MAX_SCALE, 1.0f, DURATION);
         }
         else if (animationFrame == BEST_COMBO)
         {
             bestMultiplier.gameObject.SetActive(true);
             bestMultiplier.SetText(COMBO_PREFIX + bestCombo);
             bestMultiplier.Grow(MAX_SCALE, 1.0f, DURATION);
         }
         else if (animationFrame == FINAL_GRADE)
         {
             finalGrade.gameObject.SetActive(true);
             finalGrade.SetText(GRADE_PREFIX + new TitleFormatter().Format(score));
             finalGrade.Grow(MAX_SCALE, 1.0f, DURATION);
         }
         animationFrame++;
         if (animationFrame >= END)
         {
             animationFrame = STOPPED;
         }
     }
 }
예제 #2
0
 /// <summary>
 /// Increments the current combo streak and score.
 /// </summary>
 public void IncrementStreak()
 {
     Debug.Log("Highscore streak increase!");
     if (!isLevelActive)
     {
         return;
     }
     multiplier.gameObject.SetActive(true);
     combo++;
     multiplier.SetText("x" + combo);
     multiplier.Grow(MULTIPLIER_START_SIZE, 1.0f, MULTIPLIER_DURATION);
     score += combo * SCORE_MULTIPLIER;
     levelScore.SetText(new ScoreFormatter().Format(score));
 }