public override void Update(GameTime gameTime, bool otherScreenHasFocus,
bool coveredByOtherScreen)
{
base.Update(gameTime, otherScreenHasFocus, coveredByOtherScreen);
transition += (float)gameTime.ElapsedGameTime.TotalSeconds;
if (transition > 1)
transition = 0;
// If all the previous screens have finished transitioning
// off, it is time to actually perform the load.
if (otherScreensAreGone) {
ScreenManager.RemoveScreen(this);
foreach (GameScreen screen in screensToLoad) {
if (screen != null) {
ScreenManager.AddScreen(screen, ControllingPlayer);
}
}
// Once the load has finished, we use ResetElapsedTime to tell
// the game timing mechanism that we have just finished a very
// long frame, and that it should not try to catch up.
ScreenManager.Game.ResetElapsedTime();
}
}