public void RegressPhase() { PhaseState = PhaseEnum.Unstarted; if (Starting != null) { StopCoroutine(Starting); } if (Ending != null) { StopCoroutine(Ending); } PreviousPhase.ResetPhase(true); }
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; }