Tidying up source code for release. Also refactored World to use a Group instance, rather tha duplicate functions.

This commit is contained in:
Richard Davey
2013-09-11 13:21:07 +01:00
parent 87858d6bbf
commit f260108433
25 changed files with 278 additions and 487 deletions
+18 -10
View File
@@ -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
}
});