コード例 #1
0
        public void TakeTurn()
        {
            if (currentPhase.HasEnteredPhase == false)
            {
                currentPhase.RaisePhaseComplete += HandleOnPhaseCompleted;
                currentPhase.EnterPhase( );
            }

            currentPhase.ExecutePhase( );

            if (currentPhase.HasCompletedPhase == false)
            {
                return;
            }

            currentPhase = nextPhase;

            if (nextPhase == null)
            {
                OnTurnCompleted( );
                return;
            }

            nextPhase = null;

            currentPhase.RaisePhaseComplete -= HandleOnPhaseCompleted;
        }