void DetermineUpdateRulestate(GameplayType gameplayType, out GameplayUpdateFn gameplayUpdateFn, out BaseGameplayRulestate currentRulestate)
    {
        gameplayUpdateFn = null;
        currentRulestate = null;

        switch (gameplayType)
        {
        case GameplayType.Bot:
        {
            gameplayUpdateFn = UpdateBotGameplay;
            currentRulestate = new BotGameplayRulestate(KickMissFeedback);
        }
        break;

        case GameplayType.Guitar:
        {
            gameplayUpdateFn = UpdateGuitarGameplay;
            currentRulestate = new GuitarGameplayRulestate(KickMissFeedback);
        }
        break;

        case GameplayType.Drums:
        {
            gameplayUpdateFn = UpdateDrumsGameplay;
            currentRulestate = new DrumsGameplayRulestate(KickMissFeedback);
        }
        break;

        default:
        {
        }
        break;
        }
    }
Пример #2
0
    void UpdateUIStats(BaseGameplayRulestate currentRulestate)
    {
        BaseGameplayRulestate.NoteStats stats = currentRulestate.stats;
        uint noteStreak = stats.noteStreak;
        uint totalNotes = stats.totalNotes;
        uint notesHit   = stats.notesHit;

        noteStreakText.text = noteStreak.ToString();
        if (totalNotes > 0)
        {
            percentHitText.text = ((float)notesHit / (float)totalNotes * 100).Round(2).ToString() + "%";
        }
        else
        {
            percentHitText.text = "0.00%";
        }

        totalHitText.text = notesHit.ToString() + " / " + totalNotes.ToString();
    }
 void UpdateUIStats(BaseGameplayRulestate currentRulestate)
 {
     BaseGameplayRulestate.NoteStats stats = currentRulestate.stats;
 }