public void Update(float delta) { if (game.CurrentScoreRecord >= ToboganGame.MAX_ANSWERS_RECORD) { // Maximum tower height reached game.SetCurrentState(game.ResultState); return; } game.Context.GetOverlayWidget().SetClockTime(gameTime.Time); if (!hurryUpSfx) { if (gameTime.Time < 4f) { hurryUpSfx = true; timesUpAudioSource = game.Context.GetAudioManager().PlaySound(Sfx.DangerClockLong); } } gameTime.Update(delta); if (requestNextQueston) { nextQuestionTimer -= delta; if (nextQuestionTimer <= 0f) { game.questionsManager.StartNewQuestion(); requestNextQueston = false; } } }
public void Update(float delta) { if (!tutorialStarted) { delayStartTutorial += -delta; if (delayStartTutorial <= 0f) { tutorialStarted = true; TutorialDrawLine(); } } if (toPlayState) { toPlayStateTimer -= delta; if (toPlayStateTimer <= 0f) { toPlayState = false; game.SetCurrentState(game.PlayState); } } if (pointerUp && tutorialStarted) { tutorialStarted = false; delayStartTutorial = 3f; } if (requestNextQueston) { nextQuestionTimer -= delta; if (nextQuestionTimer <= 0f) { game.questionsManager.StartNewQuestion(); requestNextQueston = false; } } }