Exemplo n.º 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();
            }
        }
Exemplo n.º 2
0
        private void transition_OnFinished(object sender, StateTransitionEventArgs e)
        {
            transition = null;
            ChangeNextState();

            if (OnTransitionFinished != null)
            {
                OnTransitionFinished(this, new MapStateManagerEventArgs(currentMapState, null));
            }
        }
Exemplo n.º 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();
            }
        }