Пример #1
0
    private IEnumerator _Correct()
    {
        Throwable = false;
        Execution.Clear();

        yield return(new WaitForSeconds(0.5f));

        CorrectAudio.Play();
        while (CorrectAudio.isPlaying)
        {
            yield return(null);
        }

        if (Rounds > 0)
        {
            Length++;
            GenerateSequence();
        }
        else
        {
            yield return(new WaitForSeconds(0.5f));

            Free      = true;
            Throwable = true;
            VictoryScript.Enable();
        }
    }
Пример #2
0
    IEnumerator _waitAndEnd(int seconds)
    {
        //bit of delay to show the full cake, then show the victory label
        yield return(new WaitForSeconds(seconds));

        victoryScript.Enable();
    }
Пример #3
0
    public void CorrectAnswer()
    {
        //give audio feedback
        aSource.Play();
        objectsWeighed++;

        //check if final round
        if (objectsWeighed >= AmountOfRounds)
        {
            gameOver = true;
            VictoryLabel.Enable();
        }
        else
        {
            //loop
            ResetGame();
        }
    }
Пример #4
0
 private void Win()
 {
     Victory = true;
     VictoryLabel.Enable();
 }
Пример #5
0
    IEnumerator _Victory()
    {
        yield return(new WaitForSeconds(0.5f));

        VictoryCanvas.Enable();
    }