示例#1
0
 public AttackState(Unit unit, HitPoints target)
 {
     this.unit = unit;
     Debug.Log($"{unit.name} started attacking {target.name}.");
     this.target  = target;
     targetRadius = target.GetComponent <ObjectRadius>();
 }
示例#2
0
 public ChaseState(Unit unit, HitPoints target, float stopDistance)
 {
     this.target       = target;
     this.stopDistance = stopDistance;
     agent             = unit.Agent;
     agent.speed       = unit.CurrentJob.movementSpeed;
     path         = new NavMeshPath();
     targetRadius = target.GetComponent <ObjectRadius>();
 }