Example #1
0
    void ScoreBeat(typingBeat beat)
    {
        switch (beat.typeCue)
        {
        case typingBeat.CueState.OK:
            gameScore += 1;
            Debug.Log("OK!");
            Destroy(beat.gameObject);
            break;

        case typingBeat.CueState.Good:
            gameScore += 2;
            Debug.Log("Good!");
            Destroy(beat.gameObject);
            break;

        case typingBeat.CueState.Perfect:
            gameScore += 3;
            Debug.Log("Perfect!");
            Destroy(beat.gameObject);
            break;

        case typingBeat.CueState.Late:
            Destroy(beat.gameObject);
            Debug.Log("Missed!");
            break;
        }
    }
Example #2
0
    void CreateTurnSwaps()
    {
        for (int i = 0; i < gameLength; i++)
        {
            MBT        newMeasure = new MBT(turnLength * (i + 1), 0, 0);
            typingBeat newBeat    = new typingBeat();
            newBeat.bmEvent.eventMBT = newMeasure;
            newBeat.bmEvent.inputKey = KeyCode.Return;

            bmEvents.Add(newBeat);
        }
    }
    public void createCues(int length, float[] times)
    {
        if (length < 4)
        {
            return;
        }

        for (int i = 0; i < length; i++)
        {
            typingBeat newBeat = Instantiate(beatFab);
            newBeat.activeTime = times[i];
            bubbles.Add(newBeat);
        }
    }