public void Update(float delta) { if (toNextState) { nextStateTimer -= delta; if (nextStateTimer <= 0f) { toNextState = false; if (game.currentStage >= EggGame.numberOfStage) { game.eggController.Reset(); game.runLettersBox.RemoveAllRunLetters(); game.eggButtonBox.RemoveButtons(); game.Context.GetAudioManager().PlayMusic(Music.Relax); game.EndGame(game.CurrentStars, game.correctStages); } else { game.SetCurrentState(game.QuestionState); } } } }
void OnQuestionAudioComplete() { DisableEggButtonsInput(); game.eggController.EmoticonClose(); game.SetCurrentState(game.PlayState); }
void OnQuestionAudioComplete() { if (passed) { return; } passed = true; DisableEggButtonsInput(); game.eggController.EmoticonClose(); game.SetCurrentState(game.PlayState); }
public void Update(float delta) { if (toNextState) { nextStateTimer -= delta; if (nextStateTimer <= 0f) { toNextState = false; if (!showTutorial) { if (game.stagePositiveResult) { game.CurrentScore++; ILivingLetterData runLetterData; if (EggConfiguration.Instance.Variation == EggVariation.BuildWord) { runLetterData = new LL_ImageData(game.CurrentQuestion.Question.Id); } else if (EggConfiguration.Instance.Variation == EggVariation.Image) { runLetterData = new LL_ImageData(game.CurrentQuestion.Answers[0].Id); } else { runLetterData = game.CurrentQuestion.Answers[0]; } game.runLettersBox.AddRunLetter(runLetterData); } game.currentStage++; game.antura.NextStage(); } game.SetCurrentState(game.ResultState); } } inputButtonTimer -= delta; if (repeatInputHasProgressed) { PlayPositiveAudioFeedback(); game.eggController.EmoticonPositive(); game.eggController.StartShake(); game.eggController.ParticleCorrectEnabled(); repeatInputHasProgressed = false; if (inputButtonTimer >= 0) { inputButtonCount++; } else { inputButtonCount = 0; } if (inputButtonCount >= inputButtonMax) { inputButtonCount = 0; PositiveFeedback(); } tutorialDelayTimer = 0.5f; inputButtonTimer = inputButtonTime; } if (showTutorial && !tutorialStop) { if (tutorialCorrectActive) { tutorialCorrectTimer -= delta; if (tutorialCorrectTimer <= 0f) { if (isSequence) { tutorialSequenceIndex++; if (tutorialSequenceIndex < correctAnswers) { tutorialCorrectTimer = 1f; Vector3 clickPosition = game.eggButtonBox.GetButtons(false)[tutorialSequenceIndex].transform.position; TutorialUI.Click(clickPosition); } else { tutorialCorrectActive = false; tutorialDelayTimer = tutorialDelayTime; } } else { tutorialCorrectActive = false; tutorialDelayTimer = tutorialDelayTime; } } } else { tutorialDelayTimer -= delta; if (tutorialDelayTimer <= 0f) { ShowTutorialPressCorrect(); } } } }