Пример #1
0
    private void LabelChange()
    {
        TextMesh textMesh  = GetComponentInChildren <TextMesh>();
        string   labelText = $"{wayPoint.GetGridPos().x},{wayPoint.GetGridPos().y}";

        textMesh.text   = labelText;
        gameObject.name = labelText;
    }
 private void ExploreNeighbours()
 {
     if (PathFinded)
     {
         return;
     }
     foreach (var direction in directions)
     {
         Vector2Int neighbourCoordinates = currentWayPoint.GetGridPos() + direction;
         if (grid.ContainsKey(neighbourCoordinates))
         {
             PathfinedAdd(neighbourCoordinates);
         }
     }
 }