IEnumerator OnBecameInvisible() { if (EmeraldComponent.CurrentDetectionRef != Emerald_AI.CurrentDetection.Alert && EmeraldComponent.CurrentTarget == null && !EmeraldComponent.ReturningToStartInProgress && EmeraldComponent.BehaviorRef != Emerald_AI.CurrentBehavior.Companion) { yield return(new WaitForSeconds(DeactivateSeconds)); EmeraldComponent.Deactivate(); } }
void OnBecameInvisible() { EmeraldComponent.Deactivate(); }