Beispiel #1
0
 /// <summary>
 /// Remove object hook from the list
 /// </summary>
 /// <param name="objectHook"></param>
 public void Remove(ItemHook objectHook)
 {
     if (ItemsHooks.Contains(objectHook))
     {
         ItemsHooks.Remove(objectHook);
     }
 }
Beispiel #2
0
 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;
         }
     }
 }
Beispiel #3
0
        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;
                }
            }
        }
Beispiel #4
0
 /// <summary>
 /// Add object hook to the list
 /// </summary>
 /// <param name="newHook"></param>
 public void Add(ItemHook newHook)
 {
     ItemsHooks.Add(newHook);
 }