Exemplo n.º 1
0
        private void UpdateFadeOut(GameTime gameTime)
        {
            scene.Update(gameTime);
            if (scene.IsEnd())
            {
                state = SceneFadeState.Out;
            }

            timer.Update();
            if (timer.IsTime())
            {
                isEnd = true;
            }
        }
Exemplo n.º 2
0
        private void UpdateFadeNone(GameTime gameTime)
        {
            scene.Update(gameTime);
            if (scene.IsEnd())
            {
                state = SceneFadeState.Out;
                timer.Initialize();

                if (NoFadeOut(scene.Next()))
                {
                    state = SceneFadeState.None;
                    isEnd = true;
                }
            }
        }
Exemplo n.º 3
0
        public void Initialize(SceneType lastScene)
        {
            isEnd = false;
            scene.Initialize(lastScene);


            state = startState;
            timer = new Timer(FADE_TIMER);
            timer.Initialize();

            //以下のシーンから来た場合FadeIn処理しない
            if (NoFadeIn(lastScene))
            {
                state = SceneFadeState.None;
            }
        }
Exemplo n.º 4
0
        private void UpdateFadeIn(GameTime gameTime)
        {
            scene.Update(gameTime);
            if (scene.IsEnd())
            {
                state = SceneFadeState.Out;

                if (NoFadeOut(scene.Next()))
                {
                    state = SceneFadeState.None;
                }
            }

            timer.Update();
            if (timer.IsTime())
            {
                state = SceneFadeState.None;
            }
        }
Exemplo n.º 5
0
 public SceneFader(IScene scene, SceneFadeState state, GameDevice gameDevice)
 {
     renderer   = gameDevice.Renderer;
     this.scene = scene;
     startState = state;
 }