public void Answer(Game5Choice choice5) { int correctAnswer = currentRandomize; if (choice5.Answer == correctAnswer) { currentRound++; if (!WrongBefore) { ScoreAll.Score++; } if (currentRound > 2) { state = Game5State.Wait; StartCoroutine(ForwardRoutine()); } else { state = Game5State.Wait; StartCoroutine(WinRoutine()); } } else { WrongBefore = true; choice5.GetComponent <Animation>().Play(); } }
IEnumerator StartRoundRoutine() { yield return(new WaitForSeconds(0.2f)); currentRandomize = bag[currentRound]; currentChoice = choices[currentRandomize]; animator.SetTrigger("Instruction"); yield return(new WaitForSeconds(2)); state = Game5State.Shake; currentShake = 0; previousFrameShake = Input.acceleration; }
public void Answer(Game5Choice Choice5) { if (answer == Choice5.Answer) { if (!WrongBefore) { ScoreAll.Score++; } game9NumberLogic.Forward(); } else { WrongBefore = true; // game5Logic.Forward(); Choice5.GetComponent <Animation>().Play(); } }