Invoke repeating + add goal distance to neutral behavior
This commit is contained in:
parent
bf010f3476
commit
ca7ce8e645
4 changed files with 11 additions and 13 deletions
|
@ -58,9 +58,13 @@ public class MovementHandler : MonoBehaviour
|
|||
if (agent.enabled) agent.SetDestination(destination);
|
||||
}
|
||||
|
||||
public void MoveTowardsNearest()
|
||||
public void UpdateNearest()
|
||||
{
|
||||
TargetUnit = FindNearestEnemy();
|
||||
}
|
||||
|
||||
public void MoveTowardsNearest()
|
||||
{
|
||||
MoveTowards(TargetUnit.transform.position);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue