Esempio n. 1
0
    void Start()
    {
        pathfinding = GetComponent <Pathfinding2>();
        manager     = GetComponent <PathManager>();

        pathfinding.SetGrid(grid);
        pathfinding.SetPathManager(manager);
        grid.CreateGrid();
    }
Esempio n. 2
0
        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]);
        }
Esempio n. 3
0
 public void UpdateGrid()
 {
     pathingGrid.CreateGrid();
 }