示例#1
0
        public GameScreenManager()
        {
            Dimensions = Resolution.Instance.VirtualResolution;
                currentScreen = new screens.SplashScreen();

                Image = new image.Image();
                Image.Path = "screenManager/FadeImage";
                Image.Effects = "image.effects.FadeEffect";
        }
示例#2
0
 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;
             }
         }
 }