コード例 #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();
            }
        }
コード例 #2
0
ファイル: MapStateManager.cs プロジェクト: Jntz/jamipeli
        private void transition_OnFinished(object sender, StateTransitionEventArgs e)
        {
            transition = null;
            ChangeNextState();

            if (OnTransitionFinished != null)
            {
                OnTransitionFinished(this, new MapStateManagerEventArgs(currentMapState, null));
            }
        }
コード例 #3
0
ファイル: MapStateManager.cs プロジェクト: Jntz/jamipeli
        /// <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();
            }
        }