jSplunk / ChainRapper

Brains Eden 2019 Game Jam
Apache License 2.0
0 stars 0 forks source link

Rhymes #18

Open TheRensei opened 5 years ago

TheRensei commented 5 years ago
    //run after counter increased
    public void CheckRhymes()
    {
        if (counter % 2 == 0)
        {
            if(chosenIndex == chosenIndexPrev && counter > 0)
            {
                //Play sound
                //Crowd Cheer
                staticDataTrack.AddScore(99);
            }
        }
    }

    //test------------
    //Take this from button pressed
    public int chosenIndex;
    public int chosenIndexPrev;

    //Assign it to buttons as the first function run
    public void SetChosenIndex(int newIndex)
    {
        Debug.Log(counter);
        if(counter % 2 != 0)
        {
            chosenIndexPrev = chosenIndex;
        }
        chosenIndex = newIndex;
    }