Пример #1
0
 public ScreenManager()
 {
     Dimensions = new Vector2(800, 600);
     _CurrentScreen = new SplashScreen();
     _XmlGameScreenManager = new XmlManager<BaseScreen>();
     _CurrentScreen = _XmlGameScreenManager.Load("Content/SplashScreen/splashScreen.xml", typeof(SplashScreen));
 }
Пример #2
0
 private void Transition(GameTime gameTime)
 {
     if (!IsTransitioning)
         return;
     Image.Update(gameTime);
     if (Image.Alpha >= 1.0f)
     {
         _CurrentScreen.UnloadContent();
         _CurrentScreen = _NewScreen;
         _CurrentScreen = _XmlGameScreenManager.Load(_CurrentScreen.XmlPath, _CurrentScreen.GetType());
         _CurrentScreen.LoadContent();
     }
     else if (Image.Alpha <= 0.0f)
     {
         Image.IsActive = false;
         IsTransitioning = false;
     }
 }