예제 #1
0
 void OnTriggerEnter(Collider collision)
 {
     if (AIScript.compatibilityChecker(collision.gameObject, AIScript.charType))
     {
         if (collision.gameObject != AIScript.TargetFromGameObject(AIScript.targets, collision.gameObject).Obj)
         {
             global::NPCAI.Target temp = new global::NPCAI.Target(collision.gameObject, AIScript.distance(collision.gameObject));
             temp.radius = collision.gameObject.GetComponent <CapsuleCollider>().radius;
             AIScript.targets.Add(temp);
             AIScript.Agrivated = true;
         }
     }
 }