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); } } } }
public void Update(float delta) { timer -= delta; if (timer <= 0f) { game.SetCurrentState(game.QuestionState); return; } }