void OnTriggerExit(Collider other) { if (other.attachedRigidbody) { if (controller != null && other.attachedRigidbody.gameObject == controller.gameObject) { controller = null; inRange = false; buttonPrompt.SetActive(false); } } }
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; } } }
void OnTriggerStay(Collider other) { if (other.attachedRigidbody != null) { AtlatlBoyController tempController = other.attachedRigidbody.GetComponent <AtlatlBoyController>(); if (tempController != null) { controller = tempController; canCraft = true; craftPrompt.SetActive(true); } } }