private void Start() { _arriveBehaviour = GetComponent <ArriveAtPointBehaviour>(); _shootBehaviour = GetComponent <AIShootBehaviour>(); _lookAtTarget = GetComponent <LookAtTargetBehaviour>(); _agent = GetComponent <NavMeshAgent>(); _shootBehaviour.enabled = false; _lookAtTarget.enabled = false; _lookAtTarget.Target = Target; _arriveBehaviour.TargetPosition = GetRandomPositionInView(); _newPositionDelay = Random.Range(_newPositionMedianDelay - _delayOffset, _newPositionMedianDelay + _delayOffset); }
private void Start() { _arriveBehaviour = GetComponent <ArriveAtPointBehaviour>(); _strafeBehaviour = GetComponent <StrafeBehaviour>(); _shootBehaviour = GetComponent <AIShootBehaviour>(); _lookAtTarget = GetComponent <LookAtTargetBehaviour>(); _agent = GetComponent <NavMeshAgent>(); _strafeBehaviour.enabled = false; _shootBehaviour.enabled = false; _lookAtTarget.enabled = false; _arriveBehaviour.enabled = true; _lookAtTarget.Target = Target; _arriveBehaviour.TargetPosition = GetRandomPositionInView(); }