void Awake() { generateGraph = (generateGraph == null) ? this : generateGraph; tileOffset = .5f; bounds = tilemap.cellBounds; offset = bounds.position; tile = tilemap.GetTilesBlock(bounds); myTile = new MyTile[bounds.size.x, bounds.size.y]; GenerateGrapthArray(); AddPathAndPoint(); SortTileNeighborsByWeight(); }
public GrapthTools() { generatePath = GenerateGraph.generateGraph; }