Beispiel #1
0
        /// <summary>
        /// Aloittaa siirtymän toiston.
        /// </summary>
        public void StartTransition()
        {
            if (transition == null)
            {
                transition             = new StateTransition(nextMapState, currentMapState);
                transition.OnFinished += new StateTransitionEventHandler(transition_OnFinished);

                transition.Start();

                if (OnTransitionStart != null)
                {
                    OnTransitionStart(this, new MapStateManagerEventArgs(currentMapState, nextMapState));
                }

                currentMapState.ClearPowerUps();
            }
        }
Beispiel #2
0
        private void transition_OnFinished(object sender, StateTransitionEventArgs e)
        {
            transition = null;
            ChangeNextState();

            if (OnTransitionFinished != null)
            {
                OnTransitionFinished(this, new MapStateManagerEventArgs(currentMapState, null));
            }
        }
Beispiel #3
0
        /// <summary>
        /// Aloittaa siirtymän toiston.
        /// </summary>
        public void StartTransition()
        {
            if (transition == null)
            {
                transition = new StateTransition(nextMapState, currentMapState);
                transition.OnFinished += new StateTransitionEventHandler(transition_OnFinished);

                transition.Start();

                if (OnTransitionStart != null)
                {
                    OnTransitionStart(this, new MapStateManagerEventArgs(currentMapState, nextMapState));
                }

                currentMapState.ClearPowerUps();
            }
        }