public void Update() { if (!receivingInput) { return; } if (userInput.NumberPressed()) { int number = userInput.GetNumberPressed(); //Play Sounds stateMachine.PlaySound(AudioFiles.GameplaySoundClip.UserInput); //display number on screen stateMachine.TriggerHUDEvent(UIEvents.Type.PrepareCombinationNumber, number.ToString()); stateMachine.TriggerHUDEvent(UIEvents.Type.DisplayCombinationNumber, CombinationDisplay.Type.Normal.ToString()); //spawn anim number stateMachine.TriggerHUDEvent(UIEvents.Type.SpawnAnimNumber, number.ToString()); //add to state controller user input stateMachine.AddToUserInput(number); //increment number count NumberCount++; if (stateMachine.GetRound() == NumberCount) { receivingInput = false; stateMachine.StartCoroutine(FadeOutNumbers()); } } }