//returns the list of tile indexes along the path to the destinationIndex public IEnumerator findPathVoid(int tileThere) { int tileHere = hexa.GetTileAtLocalPos(transform.position); path = hexa.FindPath(tileHere, tileThere, 0, -1); yield return(null); }
public List <int> findPath(int tileThere) { //Get the index of the tile we're currently at int tileHere = hexa.GetTileAtLocalPos(transform.position); //Get a list of all the tiles from here to there List <int> tiles = hexa.FindPath(tileHere, tileThere, 0, -1); return(tiles); }