ZhouWeikuan/cocos2d — Issue #43: Can't retrieve tile properties
Author: Rhyder
Created: 2011-10-17 15:17:06+00:00
State: open

The following should return the properties for a tile:

propertiesHashMap = _map.propertiesForGID( layer.tileGIDAt( point ) );

It seems that the poperties for a tileset's GIDs do not match up with the map's GID's. The tile's GID's are numbered 1 through tileset size, so if there are 16 tiles, then it has GIDs 1 through 16. The map's GID's are generated in some other manner. Example is 637534208.

So when I get the tile by GID at a point on the layer it returns 637534208. When I use this GID to get the tile properties for that tile I get an error or null.