Exemplo n.º 1
0
        public static bool CanOccupy(Vector2Int coord)
        {
            if (_quadTree.TryGet(coord, out List <Obstacle> toReturn))
            {
                return(toReturn.Count <= 0);
            }

            return(true);
        }
Exemplo n.º 2
0
 public static void SetAsPathMember(Vector2Int coord, bool isPathMember)
 {
     if (_quadTree.TryGet(coord, out List <OpenTile> tiles))
     {
         Color color = isPathMember ? Color.green : Color.white;
         foreach (OpenTile tile in tiles)
         {
             tile._meshRenderer.material.color = color;
         }
     }
 }