public GameScreenManager() { Dimensions = Resolution.Instance.VirtualResolution; currentScreen = new screens.SplashScreen(); Image = new image.Image(); Image.Path = "screenManager/FadeImage"; Image.Effects = "image.effects.FadeEffect"; }
void Transition(GameTime gameTime) { if (IsTransitioning) { Image.Update(gameTime); if (Image.Alpha == 1.0f) { currentScreen.UnloadContent(); currentScreen = newScreen; currentScreen.LoadContent(); } else if (Image.Alpha == 0.0f) { Image.IsActive = false; IsTransitioning = false; } } }