Closed fariazz closed 11 years ago
Added the ability for the user to specify which layer in the TMX file will be used.
Tested in a platformer where I used one layer for the collision and one for background, it works fine:
Q.scene("level1",function(stage) { //background stage.insert(new Q.TileLayer({ dataAsset: 'level1.tmx', layerIndex: 0, sheet: 'tiles', tileW: 70, tileH: 70, type: Q.SPRITE_NONE })); stage.collisionLayer(new Q.TileLayer({ dataAsset: 'level1.tmx', layerIndex:1, sheet: 'tiles', tileW: 70, tileH: 70 })); var player = stage.insert(new Q.Player()); stage.add("viewport").follow(player); });
Added the ability for the user to specify which layer in the TMX file will be used.
Tested in a platformer where I used one layer for the collision and one for background, it works fine: