void OnTriggerExit(Collider other)
 {
     if (other.attachedRigidbody)
     {
         if (controller != null && other.attachedRigidbody.gameObject == controller.gameObject)
         {
             controller = null;
             inRange    = false;
             buttonPrompt.SetActive(false);
         }
     }
 }
Beispiel #2
0
 void OnTriggerExit(Collider other)
 {
     if (other.attachedRigidbody != null)
     {
         if (controller != null && other.attachedRigidbody.gameObject == controller.gameObject)
         {
             controller = null;
             canCraft   = false;
             craftPrompt.SetActive(false);
         }
     }
 }
        void OnTriggerEnter(Collider other)
        {
            if (other.attachedRigidbody)
            {
                AtlatlBoyController tempController = other.attachedRigidbody.GetComponent <AtlatlBoyController>();

                if (tempController != null)
                {
                    controller = tempController;
                    buttonPrompt.SetActive(true);
                    inRange = true;
                }
            }
        }
Beispiel #4
0
        void OnTriggerStay(Collider other)
        {
            if (other.attachedRigidbody != null)
            {
                AtlatlBoyController tempController = other.attachedRigidbody.GetComponent <AtlatlBoyController>();

                if (tempController != null)
                {
                    controller = tempController;
                    canCraft   = true;
                    craftPrompt.SetActive(true);
                }
            }
        }