예제 #1
0
        private void Update()
        {
            timeSinceLastAttack += Time.deltaTime;

            if (IsAttacking && target != null)
            {
                if (isOutOfRange())
                {
                    moveService.MoveTo(target.transform.position);
                }
                else
                {
                    moveService.SetActive(false);
                    moveService.RotateTowards(target.transform);
                    AttackBehaviour();
                }
            }
        }
예제 #2
0
 public void MoveToPosition(Vector3 point)
 {
     moveService.MoveTo(point);
     actionScheduler.SetCurrentAction(this);
 }