Extracting the correct area from a layer, debug displaying it and preparing for collision.

This commit is contained in:
photonstorm
2013-10-15 05:41:42 +01:00
parent dd695e066f
commit f3ea68aad3
7 changed files with 551 additions and 253 deletions
+26
View File
@@ -100,10 +100,36 @@ Phaser.Tile = function (tileset, index, x, y, width, height) {
*/
this.separateY = true;
/**
* @property {boolean} collisionCallback - Tilemap collision callback.
* @default
*/
this.collisionCallback = null;
/**
* @property {boolean} collisionCallback - Tilemap collision callback.
* @default
*/
this.collisionCallbackContext = this;
};
Phaser.Tile.prototype = {
/**
* Set callback to be called when this tilemap collides.
*
* @method Phaser.Tilemap.prototype.setCollisionCallback
* @param {Function} callback - Callback function.
* @param {object} context - Callback will be called with this context.
*/
setCollisionCallback: function (callback, context) {
this.collisionCallbackContext = context;
this.collisionCallback = callback;
},
/**
* Clean up memory.
* @method destroy