Exemplo n.º 1
0
 public void OnSetTarget(TargetPoint target)
 {
     if(Target != null)
     {
         Target.RemoveLink();
     }
     Target = target;
     Target.AddLink();
 }
Exemplo n.º 2
0
 //  установка новой цели движения
 public void OnSetTarget(TargetPoint point)
 {
     if (targetPoint != null)
     {
         targetPoint.DeleteLink();
     }
     if (!TerrainNavGrid.IsPositionCorrect(point.Position))
     {
         return;
     }
     StopMove();
     targetPoint = point;
     targetPoint.AddLink();
     PathImage = new PathImage(GameParams.Width, GameParams.Length);
     SetMovePosition(targetPoint.Position);
 }
Exemplo n.º 3
0
 public void OnSetTarget(TargetPoint target)
 {
     if(Target != null)
     {
         Target.RemoveLink();
     }
     Target = target;
     Target.AddLink();
     targetPosition = Target.transform.position;
     Agent.stoppingDistance = Random.Range(1.0F, 15.0F);
 }