示例#1
0
 void OnTriggerExit(Collider other)
 {
     if (other.GetComponent <SupportBotController>() != null && supportBotController == other.GetComponent <SupportBotController>())
     {
         supportBotController = null;
     }
 }
示例#2
0
    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;
        }
    }