-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add z-index property support for tile layer #255
Comments
@JumpLink I agree, z index support per layer would be great. Does this rely on a custom property for the layer? Something like this? |
I'm 100% behind the z-indexed layers. I propose we take a slightly different approach. Currently the Tiled plugin only creates one excalibur Creating an
const tilemap = new ex.TileMap(...);
const tx = tilemap.get(ex.TransformComponent);
tx.z = 5; Perhaps we could add an optionally configurable base z-index that increments with the Tiled layers? Maybe another optional constructor argument? const options = {
layerZIndexBase: 0
}
// Options are optional
const tiledResource = new TiledMapResource("/assets/map.tmx", options);
// or
const tiledResource = new TiledMapResource("/assets/map.tmx"); To implement z-indexed layers:
|
@eonarheim sounds good. I'll see if I find the time to implement it that way. To your screenshot: Yes, I would suggest that too. What do you think of merging layers with the same zindex (or none) as is currently the case? Then we would still have the performance advantage as currently. |
Context
It is uncomfortable to have to use tile objects every time you want a tile to appear above the hero, for example rooftops, trees, etc. There should be an easier way to set whole layer above the hero. This is also a common approach, for example in RPG Maker.
Proposal
Add support for the ZIndex property as it is already available for Tile Objects.
The text was updated successfully, but these errors were encountered: