public static void UnlockInteraction() { if (LockedInteraction != null) { if (!LockedInteraction.Entered) { LockedInteraction.StopAllCoroutines(); LockedInteraction.OnExit(); } } LockedInteraction = null; }
protected virtual void OnExit() { Entered = false; EnteredTransform = null; EnteredInteractions.Remove(this); if (LastEnteredInteraction == this) { LastEnteredInteraction = null; if (EnteredInteractions.Count > 0) { LastEnteredInteraction = EnteredInteractions[EnteredInteractions.Count - 1]; } } }
protected virtual void OnEnter() { Entered = true; EnteredInteractions.Add(this); LastEnteredInteraction = this; }