public ScreenManager() { Dimensions = new Vector2(640, 480); currentScreen = new GameplayScreen(); XmlGameScreenManager = new XmlManager<GameScreen>(); XmlGameScreenManager.Type = currentScreen.Type; //currentScreen = XmlGameScreenManager.Load("Load/SplashScreen.xml"); }
void Transition(GameTime gameTime) { if (IsTransitioning) { Image.Update(gameTime); if(Image.Alpha == 1.0f) { currentScreen.UnloadContent(); currentScreen = newScreen; XmlGameScreenManager.Type = currentScreen.Type; if (File.Exists(currentScreen.XmlPath)) currentScreen = XmlGameScreenManager.Load(currentScreen.XmlPath); currentScreen.LoadContent(); } else if (Image.Alpha == 0.0f) { Image.IsActive = false; IsTransitioning = false; } } }