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(); } }
IEnumerator _waitAndEnd(int seconds) { //bit of delay to show the full cake, then show the victory label yield return(new WaitForSeconds(seconds)); victoryScript.Enable(); }
public void CorrectAnswer() { //give audio feedback aSource.Play(); objectsWeighed++; //check if final round if (objectsWeighed >= AmountOfRounds) { gameOver = true; VictoryLabel.Enable(); } else { //loop ResetGame(); } }
private void Win() { Victory = true; VictoryLabel.Enable(); }
IEnumerator _Victory() { yield return(new WaitForSeconds(0.5f)); VictoryCanvas.Enable(); }