Exemplo n.º 1
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);
 }