/// <summary> /// Remove object hook from the list /// </summary> /// <param name="objectHook"></param> public void Remove(ItemHook objectHook) { if (ItemsHooks.Contains(objectHook)) { ItemsHooks.Remove(objectHook); } }
void OnTriggerExit(Collider other) { if (other.gameObject.name.StartsWith("wheel_")) { GameObject wheel = other.gameObject; ItemHook hook = wheel.GetComponent <ItemHook>(); if (hook != null) { hook.DontDisable = false; } } }
void OnTriggerStay(Collider other) { if (isTriggerLoaded) { return; } if (other.gameObject.name.StartsWith("wheel_")) { GameObject wheel = other.gameObject; ItemHook hook = wheel.GetComponent <ItemHook>(); if (hook != null) { hook.DontDisable = true; } } }
/// <summary> /// Add object hook to the list /// </summary> /// <param name="newHook"></param> public void Add(ItemHook newHook) { ItemsHooks.Add(newHook); }