Exemplo n.º 1
0
 public override void Handle(EnemyAI context)
 {
     if (context.playerIsFar())
         context.State = new Idle();
     else
         context.direction = (context.player.transform.position - context.transform.position).normalized;
 }