예제 #1
0
        protected override void Update(GameTime gameTime)
        {
            input.update();

            double dt = gameTime.ElapsedGameTime.TotalSeconds;

            TimeOfDay.addSeconds(dt * 360);

            if (states.Count > 0)
            {
                IGameState state = (IGameState)states.Peek();
                state.onInput(input);
                state.update(dt);
            }

            if (fade != null)
            {
                fade.update(dt);
            }
            if (fade != null && fade.finished)
            {
                fade = null;
            }

            base.Update(gameTime);
        }
예제 #2
0
 void startFade(Action midpoint, bool fullscreen)
 {
     if (fade != null)
     {
         return;
     }
     fade            = new UiScreenFade(midpoint);
     fade.fullscreen = fullscreen;
 }