mirror of
https://github.com/wassname/phaser.git
synced 2026-07-24 13:10:53 +08:00
Tidying up source code for release. Also refactored World to use a Group instance, rather tha duplicate functions.
This commit is contained in:
+18
-10
@@ -227,14 +227,18 @@ Object.defineProperty(Phaser.Physics.Arcade.Body.prototype, "bottom", {
|
||||
* @param {Number} value
|
||||
**/
|
||||
set: function (value) {
|
||||
if(value <= this.y) {
|
||||
|
||||
if (value <= this.y)
|
||||
{
|
||||
this.height = 0;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
this.height = (this.y - value);
|
||||
}
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Object.defineProperty(Phaser.Physics.Arcade.Body.prototype, "right", {
|
||||
@@ -256,12 +260,16 @@ Object.defineProperty(Phaser.Physics.Arcade.Body.prototype, "right", {
|
||||
* @param {Number} value
|
||||
**/
|
||||
set: function (value) {
|
||||
if(value <= this.x) {
|
||||
|
||||
if (value <= this.x)
|
||||
{
|
||||
this.width = 0;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
this.width = this.x + value;
|
||||
}
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user