/// <summary> /// Keeps track of the countdown's progress, exiting the screen when the countdown is over. /// </summary> /// <param name="gameTime">Game time information.</param> /// <param name="otherScreenHasFocus">Whether this screen currently has the focus.</param> /// <param name="coveredByOtherScreen">Whether this screen is covered by another screen.</param> public override void Update(GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen) { base.Update(gameTime, otherScreenHasFocus, coveredByOtherScreen); if (!isUpdating) { return; } intervalTimer += gameTime.ElapsedGameTime; if (intervalTimer >= countdownInterval) { intervalTimer = TimeSpan.Zero; countdownValue--; } if (countdownValue <= 0) { gameplayScreen.PreDisplayInitialization(); ExitScreen(); } }