コード例 #1
0
ファイル: ScreenManager.cs プロジェクト: lcraver/TM2
 private void Transition(GameTime gameTime)
 {
     Animation.Scale = new Vector2(this.Dimensions.X, this.Dimensions.Y);
     fAnimation.Update(gameTime, ref Animation);
     if (Animation.Alpha == 1.0f && fAnimation.Timer.TotalSeconds == 1.0f)
     {
         screenStack.Push(newScreen);
         currentScreen.UnloadContent();
         currentScreen = newScreen;
         currentScreen.LoadContent(content, this.inputManager);
     }
     else if (Animation.Alpha == 0.0f)
     {
         transition = false;
         Animation.IsActive = false;
     }
     else if (Animation.Alpha < 1.0f && fAnimation.Increase == false)
     {
         currentScreen.Update(gameTime);
     }
 }
コード例 #2
0
ファイル: ScreenManager.cs プロジェクト: lcraver/TM2
 public void AddScreen(GameScreen screen, InputManager inputManager, float alpha)
 {
     transition = true;
     newScreen = screen;
     Animation.IsActive = true;
     fAnimation.ActivateValue = 1.0f;
     if (alpha != 1.0f)
     {
         fAnimation.Alpha = 1.0f - alpha;
     }
     else
     {
         fAnimation.Alpha = alpha;
     }
     fAnimation.Increase = true;
     this.inputManager = inputManager;
     //audio.Play(0);
 }
コード例 #3
0
ファイル: ScreenManager.cs プロジェクト: lcraver/TM2
        public void Initialize()
        {
            Animation = new Animation();
            ssAnimation = new SpriteSheetAnimation();
            fAnimation = new FadeAnimation();

            currentScreen = new SplashScreen();
            inputManager = new InputManager();
        }
コード例 #4
0
ファイル: ScreenManager.cs プロジェクト: lcraver/TM2
 public void AddScreen(GameScreen screen, InputManager inputManager)
 {
     transition = true;
     newScreen = screen;
     Animation.IsActive = true;
     Animation.Alpha = 0.0f;
     fAnimation.ActivateValue = 1.0f;
     fAnimation.Increase = true;
     this.inputManager = inputManager;
     //audio.FadeSong(0.0f, new TimeSpan(0, 0, 0, 0, 1200));
 }