/// <summary> /// Raises the destroy event. /// </summary> void OnDestroy() { if (coroutineContainer != null && eventHandkerCoroutine != null) { coroutineContainer.StopCoroutine(eventHandkerCoroutine); } }
/// <summary> /// Stops the highlight. /// </summary> public void StopHighlight() { Init(); if (highlightCoroutine != null) { coroutineContainer.StopCoroutine(highlightCoroutine); highlightCoroutine = null; } if (highlightTargetUI != null) { highlightTargetUI.color = originColor; } else { highlightTargetRenderer.material.color = originColor; } }
/// <summary> /// Stops the cooldown. /// </summary> public void StopCooldown() { timeLeft = 0f; if (cooldownMask != null) { // Hide mask cooldownMask.gameObject.SetActive(false); } if (cooldownText != null) { // Hide countdown cooldownText.gameObject.SetActive(false); } if (cooldownCoroutine != null) { coroutineContainer.StopCoroutine(cooldownCoroutine); cooldownCoroutine = null; } }
public static void StopACoroutine(Coroutine Routine) { if (!Initialized) { return; } if (Routine != null) { Instance.StopCoroutine(Routine); } }