Пример #1
0
        public void Draw(SpriteBatch spriteBatch)
        {
            if (running && !isFininshed)
            {
                currentTransition.Draw(spriteBatch);

                if (currentTransition.IsFininshed)
                {
                    currentTransition = GetNextTransition();
                }
            }
        }
Пример #2
0
        public void Update(GameTime gameTime)
        {
            if (running && !isFininshed)
            {
                currentTransition.Update(gameTime);

                if (currentTransition.IsFininshed)
                {
                    currentTransition = GetNextTransition();
                }
            }
        }
Пример #3
0
        public void Start()
        {
            if (running)
            {
                return;
            }

            foreach (StateTransition transition in transitions)
            {
                transition.NextGameState    = nextGameState;
                transition.CurrentGameState = currentGameState;
            }

            running = true;

            currentTransition = transitions[0];

            if (!PlayingLastTransition())
            {
                currentTransition.NextTransition = transitions[1];
            }

            currentTransition.Start();
        }
Пример #4
0
 public StateTransitionEventArgs(StateTransition sender)
 {
     this.sender = sender;
 }
Пример #5
0
 public TransitionPlayerEventArgs(StateTransition finishedTransition)
     : base()
 {
     this.finishedTransition = finishedTransition;
 }