mirror of
https://github.com/wassname/phaser.git
synced 2026-07-03 17:10:40 +08:00
Updated intersects code, tilemap collision is running again. Still finding gravity pushing sprites through tiles.
This commit is contained in:
+30
-4
@@ -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;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user