Ejemplo n.º 1
0
 public ScreenManager()
 {
     Dimensions = new Vector2(1200, 800);
     currentScreen = new SplashScreen();
     xmlGameScreenManager = new XmlManager<GameScreen>();
     xmlGameScreenManager.Type = currentScreen.Type;
     currentScreen = xmlGameScreenManager.Load("Load/SplashScreen.xml");
 }
Ejemplo n.º 2
0
 void Transistion(GameTime gameTime)
 {
     if (IsTransistioning)
     {
         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;
             IsTransistioning = false;
         }
     }
 }