Esempio n. 1
0
        public void Draw(SpriteBatch spriteBatch)
        {
            if (running && !isFininshed)
            {
                currentTransition.Draw(spriteBatch);

                if (currentTransition.IsFininshed)
                {
                    currentTransition = GetNextTransition();
                }
            }
        }
Esempio n. 2
0
        public void Update(GameTime gameTime)
        {
            if (running && !isFininshed)
            {
                currentTransition.Update(gameTime);

                if (currentTransition.IsFininshed)
                {
                    currentTransition = GetNextTransition();
                }
            }
        }
Esempio n. 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();
        }
Esempio n. 4
0
 public StateTransitionEventArgs(StateTransition sender)
 {
     this.sender = sender;
 }
Esempio n. 5
0
 public TransitionPlayerEventArgs(StateTransition finishedTransition)
     : base()
 {
     this.finishedTransition = finishedTransition;
 }