Hello, I created TMXTiledMap by Tiled editor. I use only 2 types of tiles. Both have attribute called “way”.
TMX file generated by Tiled editor:
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" orientation="isometric" renderorder="right-up" width="16" height="16" tilewidth="192" tileheight="64" nextobjectid="3">
<tileset firstgid="1" name="tileset_192x64" tilewidth="192" tileheight="64">
<image source="tileset_192x64.png" width="768" height="512"/>
<tile id="0">
<properties>
<property name="way" value="0"/>
</properties>
</tile>
<tile id="8">
<properties>
<property name="way" value="1"/>
</properties>
</tile>
</tileset>
<layer name="mainLayer" width="16" height="16">
<data>
<tile gid="1"/>
<tile gid="1"/>
<tile gid="9"/>
...
I get sprite by method getTileAt – works fine. But getTileAt( new cc.p( 0, 0 )).way is undefined. How can I access tile attributes?