void Start()
 {
     agent           = GetComponent <NavMeshAgent>();
     allAgents       = GameObject.FindObjectsOfType <ChaseBehaviour>();
     playerTransform = GameObject.FindGameObjectWithTag("Player").transform;
     destinationSet  = false;
     dc = GetComponent <DetectionCone>();
 }
Beispiel #2
0
        void Awake()
        {
            me = GetComponent <Entity>();

            // Setting up the references.
            collider = GetComponent <SphereCollider>();

            if (detectionCone == null)
            {
                detectionCone = new DetectionCone();
            }
        }
 void Start()
 {
     agent = GetComponent <NavMeshAgent>();
     dc    = GetComponent <DetectionCone>();
 }