public IEnumerable <Vector2> GetEligibleTilesToReplace(TileMap map) { var ret = map.Tiles.Cells.Points.Where(pt => CheckCondition(map, pt)).ToArray(); return(ret); }
public PotentialTileMatch(AutogenTile tile, TileMap map) { Tile = tile; PossibleTilesToReplace = tile.GetEligibleTilesToReplace(map).ToList(); }
public void Apply(TileMap map, Vector2 tile) { map.Tiles.Cells.Set(tile, CellIndexChoices.RandomElement()); }