Beispiel #1
0
 public void AddScene(Scene screen)
 {
     transition = true;
     newScene = screen;
     fade.IsActive = true;
     fade.Alpha = 0.0f;
     fade.ActivateValue = 1.0f;
 }
Beispiel #2
0
        public void AddScene(Scene screen, float alpha)
        {
            transition = true;
            newScene = screen;
            fade.IsActive = true;
            fade.ActivateValue = 1.0f;
            if (alpha != 1.0f)
                fade.Alpha = 1.0f - alpha;
            else
                fade.Alpha = alpha;

            fade.Increase = true;
        }
Beispiel #3
0
 private void Transition(GameTime gameTime)
 {
     fade.Update(gameTime);
     if (fade.Alpha == 1.0f && fade.Timer.TotalSeconds == 1.0f)
     {
         screenStack.Push(newScene);
         currentScene.UnloadContent();
         currentScene = newScene;
         currentScene.LoadContent(content, graphicDevice);
     }
     else if (fade.Alpha == 0.0f)
     {
         transition = false;
         fade.IsActive = false;
     }
 }
Beispiel #4
0
 public void Initialize()
 {
     currentScene = new SplashScreen();
     fade = new Transition();
     //inputManager = new InputManager();
 }