public void StartRotateAroundPivot() { m_RotatingGlitchRendererHandler.ActivateOrdinaryMaterial(); StopCoroutine("RotateAroundPivot"); StartCoroutine("RotateAroundPivot"); }
public void OnTriggerExit(Collider exitingCollider) { RotatingGlitchRendererHandler exitingRotatingGlitch = exitingCollider.GetComponent <RotatingGlitchRendererHandler>(); if (exitingRotatingGlitch != null && m_PresentInTriggerRotatingGlitches.Contains(exitingRotatingGlitch.gameObject)) { m_PresentInTriggerRotatingGlitches.Remove(exitingRotatingGlitch.gameObject); exitingRotatingGlitch.ActivateOrdinaryMaterial(); // We send the event only if it's the last detected glitch. if (OnGlitchDetected != null && m_PresentInTriggerRotatingGlitches.Count == 0) { OnGlitchDetected(this, e_GlitchDetectionStatus.EXITNG); } } }