public void ExitScreen() { if (TransitionOffTime == TimeSpan.Zero) { // If the screen has a zero transition time, remove it immediately. ScreenManager.RemoveScreen(this); } else { // Otherwise flag that it should transition off and then exit. isExiting = true; } }
private void DebutAnimation(float time) { if (_timer < _timer_max) { _timer += time; } else if (_timer > _timer_max) { foreach (GameScreen screen in screensToLoad) { if (screen != null) { ScreenManager.AddScreen(screen); } } // Tell all the current screens to transition off. screenToErrase.ExitScreen(); transitionDone = true; } }