Пример #1
0
 void OnTriggerExit(Collider other)
 {
     if (other.attachedRigidbody)
     {
         if (controller != null && other.attachedRigidbody.gameObject == controller.gameObject)
         {
             controller = null;
             inRange    = false;
             buttonPrompt.SetActive(false);
         }
     }
 }
Пример #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);
         }
     }
 }
Пример #3
0
        void OnTriggerEnter(Collider other)
        {
            if (other.attachedRigidbody)
            {
                AtlatlBoyController tempController = other.attachedRigidbody.GetComponent <AtlatlBoyController>();

                if (tempController != null)
                {
                    controller = tempController;
                    buttonPrompt.SetActive(true);
                    inRange = true;
                }
            }
        }
Пример #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);
                }
            }
        }