Closed jerone closed 11 years ago
This functionality was needed, but I added two methods in lieu of this (I usually want to use tile 0 to be not drawn instead of undefined as undefined looks bad in a json data file):
// Overload this method to draw tiles at frame 0 or not draw
// tiles at higher number frames
drawableTile: function(tileNum) {
return tileNum > 0;
},
// Overload this method to control which tiles trigger a collision
// (defaults to all tiles > number 0)
collidableTile: function(tileNum) {
return tileNum > 0;
},
If you inherit from Q.TileLayer
you can control what tiles get drawn and what cause collisions.
I couldn't use a zero indexed tile image for my scene.