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);
 }
Exemplo n.º 2
0
    private Queue <PathFinder> unitPathQueue  = new Queue <PathFinder>(); //  очередь из поиска путей

    // Use this for initialization

    private void Awake()
    {
        Instance = this;
        usedCell = new bool[GameParams.Length, GameParams.Width];
    }