/// <summary> /// Notify the end of the focus phase, and restart mindblast /// </summary> private void TriggerBlast() { CancelRoutine(); m_CurrentBlastPhase = BlastPhase.None; OnExitFocusPhase(); StartCoroutine(HideWick(m_BombExplosionAnimationDuration)); }
/// <summary> /// Enters in meditation phase, and start the loading blast trigger timer. /// </summary> private void LoadBlast() { m_CurrentBlastPhase = BlastPhase.Meditation; CancelRoutine(); m_Routine = StartCoroutine(EnterMeditationPhase(m_MeditationPhaseDuration, m_FocusPhaseDuration)); }
/// <summary> /// Coroutine: started when the player enters in focus phase. /// </summary> private IEnumerator EnterFocusPhase(float _FocusPhaseDuration) { OnEnterFocusPhase(); m_CurrentBlastPhase = BlastPhase.Focus; yield return(new WaitForSeconds(_FocusPhaseDuration)); // If the player focused enough to successfully make the bomb explode, this coroutine should have been cancelled before. // If not, cancel the focus phase, and reset the mindblast. OnCancelFocusPhase(); CancelRoutine(); }
/// <summary> /// Coroutine: started when the player enters in Meditation phase. /// </summary> private IEnumerator EnterMeditationPhase(float _MeditationPhaseDuration, float _FocusPhaseDuration) { OnEnterMeditationPhase(); m_CurrentBlastPhase = BlastPhase.Meditation; yield return(new WaitForSeconds(_MeditationPhaseDuration)); OnExitMeditationPhase(); // If the meditation phase hasn't been cancelled, start focus phase. m_Routine = StartCoroutine(EnterFocusPhase(_FocusPhaseDuration)); }
/// <summary> /// Cancels the meditation phase (reset mindblast) /// </summary> private void CancelMeditationPhase() { CancelRoutine(); m_CurrentBlastPhase = BlastPhase.None; OnCancelMeditationPhase(); }