void OnTriggerExit(Collider other) { if (other.GetComponent <SupportBotController>() != null && supportBotController == other.GetComponent <SupportBotController>()) { supportBotController = null; } }
void OnTriggerEnter(Collider other) { if (other.GetComponent <SupportBotController>() != null) { if (other.GetComponent <SupportBotController>().team == team) { supportBotController = other.GetComponent <SupportBotController>(); } } if (other.GetComponent <Rigidbody>() != null) { Debug.Log("<Rigidbody>() != null"); other.GetComponent <Rigidbody>().isKinematic = false; } }