Closed DevenWen closed 1 year ago
You can see in the map JSON that Tiled doesn't include a tile's properties in a tile object:
{
"class": "",
"gid": 301,
"height": 38,
"id": 8,
"name": "",
"rotation": 0,
"visible": true,
"width": 36,
"x": 246,
"y": 228.333
}
So I'm not surprised that Phaser doesn't use it either.
You can see in the map JSON that Tiled doesn't include a tile's properties in a tile object:
{ "class": "", "gid": 301, "height": 38, "id": 8, "name": "", "rotation": 0, "visible": true, "width": 36, "x": 246, "y": 228.333 }
So I'm not surprised that Phaser doesn't use it either.
@samme yes, it is. I am finding a way to do that. Or maybe I should commit a issue to Tiled? :3
Not sure there is anything we can do about this. If it's not in the JSON, we can't read it, I'm afraid.
Here is what I want to do.
I use Tiled to create a map. And I create an ObjectLayer to set some Image in it. And I know phaser still unsupport to load Image from the Tilemap as I found an issee at #6209.
So I set an "wzId" property for the Image of the Tileset in order to load the image my self. I do this as follow:
setting a ”wzId“ key-value for the blue cat in the tab of tileset editor.
create ObjectLayer and parse the blue cat in then layer of map.
export the tiledmap json file.
I load then map in Phaser code as follow:
}