MonoGame.Extended
MonoGame.Extended copied to clipboard
Rendering modified TiledMapTileLayer layer
Hi.
I'm currently working with a Tiled map composed of 6 Tile layers and rendering it with a TiledMapRenderer
. One of my layers consists of destructible blocks which I remove from the layer using the TiledMapTileLayer.RemoveTile
method. This has the effect of removing the tile from the TiledMapTileLayer
object, but the removed tile continues to be rendered by the TiledMapRenderer
.
I have found that reloading the map via TiledMapRenderer.LoadMap
fixes this, however this seems to be a fairly slow operation. My game typically runs at 60fps but will dip a frame or two whenever the map is reloaded.
Is there a less costly way of notifying the renderer of the layer change?