void Start() { agent = GetComponent <NavMeshAgent>(); allAgents = GameObject.FindObjectsOfType <ChaseBehaviour>(); playerTransform = GameObject.FindGameObjectWithTag("Player").transform; destinationSet = false; dc = GetComponent <DetectionCone>(); }
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>(); }