void Start() { agent = GetComponent <NavMeshAgent>(); childNavAgent = GetComponent <ChildNavAgent>(); childNavAgent.OnStartNavigation += StartNavigation; childNavAgent.OnEndNavigation += StopNavigation; }
private void Start() { agent = GetComponent <NavMeshAgent>(); childNavAgent = GetComponent <ChildNavAgent>(); childNavAgent.OnStartNavigation += StartNavigation; childNavAgent.OnEndNavigation += StopNavigation; StartCoroutine(GoToRandomPoint()); }
private void Start() { agent = GetComponent <NavMeshAgent>(); childNavAgent = GetComponent <ChildNavAgent>(); turret = GetComponent <Turret>(); turret.enabled = false; childNavAgent.OnStartNavigation += StartNavigation; childNavAgent.OnEndNavigation += StopNavigation; StartCoroutine(GoToThrowingPoint()); }