Updated intersects code, tilemap collision is running again. Still finding gravity pushing sprites through tiles.

This commit is contained in:
photonstorm
2014-01-28 06:52:56 +00:00
parent 9deb5514a2
commit 82cb66f47b
6 changed files with 270 additions and 278 deletions
+30 -4
View File
@@ -236,14 +236,14 @@ Object.defineProperty(Phaser.Tile.prototype, "canCollide", {
});
/**
* @name Phaser.Tile#bottom
* @property {number} bottom - The sum of the y and height properties.
* @name Phaser.Tile#left
* @property {number} left - The x value.
* @readonly
*/
Object.defineProperty(Phaser.Tile.prototype, "bottom", {
Object.defineProperty(Phaser.Tile.prototype, "left", {
get: function () {
return this.y + this.height;
return this.x;
}
});
@@ -260,3 +260,29 @@ Object.defineProperty(Phaser.Tile.prototype, "right", {
}
});
/**
* @name Phaser.Tile#top
* @property {number} top - The y value.
* @readonly
*/
Object.defineProperty(Phaser.Tile.prototype, "top", {
get: function () {
return this.y;
}
});
/**
* @name Phaser.Tile#bottom
* @property {number} bottom - The sum of the y and height properties.
* @readonly
*/
Object.defineProperty(Phaser.Tile.prototype, "bottom", {
get: function () {
return this.y + this.height;
}
});