Esempio n. 1
0
 private void IncreaseMultiplierProgress()
 {
     multiplierProgress++;
     // Check if the notes required to advance to the next multiplier level
     // is satisfied.
     if (multiplierProgress >= notesToHitForNextMultiplier)
     {
         // Check the current score multiplier level. If it is below the max,
         // increase the score multiplier.
         if (scoreMultiplier < maxScoreMultiplier)
         {
             scoreMultiplier++;
             // If it is max, keep the multiplier progress full, and use
             // particle system.
             if (scoreMultiplier >= maxScoreMultiplier)
             {
                 scoreMultiplier = maxScoreMultiplier;
                 // If player was not at max combo, regain health.
                 if (!isMultiplierMax)
                 {
                     playerHealth.AddHealthFromCombo();
                 }
                 isMultiplierMax = true;
             }
             else
             {
                 ResetMultiplierProgress();
             }
         }
         UpdateMultiplierText();
     }
     UpdateMultiplierSlider();
 }