示例#1
0
 public void RegressPhase()
 {
     PhaseState = PhaseEnum.Unstarted;
     if (Starting != null)
     {
         StopCoroutine(Starting);
     }
     if (Ending != null)
     {
         StopCoroutine(Ending);
     }
     PreviousPhase.ResetPhase(true);
 }
示例#2
0
        IEnumerator EndPhase()
        {
            EndingCorout = true;
            if (PhaseState == PhaseEnum.Running || PhaseState == PhaseEnum.Starting)
            {
                PhaseState = PhaseEnum.Ending;
                yield return(OnPhaseEnd());

                yield return(new WaitForSeconds(EndDuration));

                PhaseState = PhaseEnum.Ended;

                if (NextPhase != null)
                {
                    NextPhase.ResetPhase();
                }
            }
            EndingCorout = false;
        }