Exemplo n.º 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();
                }
            }
        }
Exemplo n.º 2
0
 public void MoveToPosition(Vector3 point)
 {
     moveService.MoveTo(point);
     actionScheduler.SetCurrentAction(this);
 }