The constructor of TiledTileLayer.cs takes 4 simply-named arguments. I’m assuming name is the layer’s name but I can’t figure out what width and height are supposed to represent.
public TiledTileLayer( TiledMap map, string name, int width, int height ) {}
Is it the width of the map, the width of the tile, the number of tiles? Should I hardcode it or get it from another object?
That’s what I thought… but then it’s a bit useless to pass as parameters since the TiledMap itself is already passed.
I guess this should work then:
var tiledMap = content.Load<TiledMap>("mytilemap");
var backgroundLayer = new TiledTileLayer(tiledMap, "ground", tiledMap.width, tiledMap.height);
I feel like these should be removed, or at least have default values if there is really a use case where you’d wanna pass something else than the actual map width and height.