void Start() { pathfinding = GetComponent <Pathfinding2>(); manager = GetComponent <PathManager>(); pathfinding.SetGrid(grid); pathfinding.SetPathManager(manager); grid.CreateGrid(); }
public Tile SetTile(Tile newTile, int i, int j) { Tile tile = (Tile)Activator.CreateInstance(newTile.GetType(), new TileCoordinates(i, j)); if (ImportantTiles.Contains(TileGrid[i, j])) { ImportantTiles.Remove(TileGrid[i, j]); } TileGrid[i, j] = tile; UpdateWorldRender(); PathingGrid.CreateGrid(this); return(TileGrid[i, j]); }
public void UpdateGrid() { pathingGrid.CreateGrid(); }