cocos2d / cocos2d-html5

Cocos2d for Web Browsers. Built using JavaScript.
https://www.cocos.com
3.07k stars 902 forks source link

Map firstgid problem #2453

Open arashbi opened 9 years ago

arashbi commented 9 years ago

There is a problem with map rendering. In case the tilesheet is external, firstgid property is not set correctly and the framework renders wrong tiles. The code is https://github.com/cocos2d/cocos2d-html5/blob/develop/cocos2d/tilemap/CCTMXXMLParser.js#L591

VisualSJ commented 9 years ago

Thanks for feedback.. There seems to be a firstgid error problem.... But I am not sure what was causing the problem... Can you send materials that a simple mistake to us? Thanks you again... ^.^ my email: sijie.wang@chukong-inc.com

arashbi commented 9 years ago

The cause of the problem is that, when tileset is defined in an external file ( tsx) firstgid is still in the map file ( tmx)