Exemple #1
0
 public override void ChangeValue(int amount)
 {
     if (useConstant)
     {
         constantValue += amount;
     }
     else
     {
         Variable.ChangeValue(amount);
     }
 }
Exemple #2
0
    /// <summary>
    /// Called when the player misses a note. Determines if the multiplier should go down or not and raises the appropriate event if so.
    /// </summary>
    public void NoteMissed()
    {
        numNotesHitInARow = 0;
        ++numNotesMissedInARow;
        score.ChangeValue(-missNoteScoreLoss);

        numNotesMissedInARow = numNotesMissedInARow % scaleMissNumNotes;

        if (numNotesMissedInARow == 0)
        {
            currMultiplier.Value = Mathf.Max(currMultiplier.Value - multiplierScaleMiss, 1);
            updateMultiplierEvent.Raise();
        }

        updateScoreEvent.Raise();
    }