예제 #1
0
        public void OnExit()
        {
            _navMeshAgent.speed = _enemyConfig.AwareMovementSpeed;

            _navMeshAgent.SetDestination(_enemy.transform.position);
            _movementController.Move(_navMeshAgent.desiredVelocity);

            _animator.SetFloat("Strafe", 0);
            _animator.SetFloat("Forward", 0);
        }
예제 #2
0
        public void OnEnter()
        {
            // Enter running animation.
            _animator.SetFloat("Strafe", 0.5f);
            _animator.SetFloat("Forward", 0.5f);

            // To check if you facing a obstacle.
            _turningTimer = int.MaxValue;

            _movementController.Move(_destination);

            _scoutingCoroutine = _enemy.StartCoroutine(StartChasing());
        }