mirror of
https://github.com/wassname/phaser.git
synced 2026-10-03 12:42:08 +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:
1 parent
87858d6bbf
commit
f260108433
25 files changed
+278
-487
No files matched your search
+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