Skip to content

Commit 1a92f5b

Browse files
committed
If you inputEnable = false a gameobject you couldn't re-enable it again using inputEnable = true, only directly via the handler (thanks @nickrall, fix phaserjs#673)
Updated the PhysicsEditor plugin to maintain position, radius, mask bits, category bits and sensor flags (thanks @georgiee, phaserjs#674)
1 parent a45c498 commit 1a92f5b

6 files changed

Lines changed: 28 additions & 0 deletions

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,19 @@ Version 2.0.3 - "Allorallen" - -in development-
6262

6363
Bug Fixes
6464

65+
* If you inputEnable = false a gameobject you couldn't re-enable it again using inputEnable = true, only directly via the handler (thanks @nickrall, fix #673)
6566

6667

6768
Updated
6869

6970
* Return the result of P2.Body.setCircle for further chaining and manipulation (fix #659)
71+
* Updated the PhysicsEditor plugin to maintain position, radius, mask bits, category bits and sensor flags (thanks @georgiee, #674)
7072

7173

7274
New Features
7375

76+
* Added ability to retrieve a single p2 fixture from the cache (thanks @georgiee, #674)
77+
7478

7579
ToDo
7680

src/gameobjects/BitmapText.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,10 @@ Object.defineProperty(Phaser.BitmapText.prototype, "inputEnabled", {
417417
this.input = new Phaser.InputHandler(this);
418418
this.input.start();
419419
}
420+
else if (this.input && !this.input.enabled)
421+
{
422+
this.input.start();
423+
}
420424
}
421425
else
422426
{
@@ -425,6 +429,7 @@ Object.defineProperty(Phaser.BitmapText.prototype, "inputEnabled", {
425429
this.input.stop();
426430
}
427431
}
432+
428433
}
429434

430435
});

src/gameobjects/Image.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,10 @@ Object.defineProperty(Phaser.Image.prototype, "inputEnabled", {
688688
this.input = new Phaser.InputHandler(this);
689689
this.input.start();
690690
}
691+
else if (this.input && !this.input.enabled)
692+
{
693+
this.input.start();
694+
}
691695
}
692696
else
693697
{

src/gameobjects/Sprite.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -878,6 +878,10 @@ Object.defineProperty(Phaser.Sprite.prototype, "inputEnabled", {
878878
this.input = new Phaser.InputHandler(this);
879879
this.input.start();
880880
}
881+
else if (this.input && !this.input.enabled)
882+
{
883+
this.input.start();
884+
}
881885
}
882886
else
883887
{
@@ -886,6 +890,7 @@ Object.defineProperty(Phaser.Sprite.prototype, "inputEnabled", {
886890
this.input.stop();
887891
}
888892
}
893+
889894
}
890895

891896
});

src/gameobjects/Text.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,10 @@ Object.defineProperty(Phaser.Text.prototype, "inputEnabled", {
838838
this.input = new Phaser.InputHandler(this);
839839
this.input.start();
840840
}
841+
else if (this.input && !this.input.enabled)
842+
{
843+
this.input.start();
844+
}
841845
}
842846
else
843847
{
@@ -846,6 +850,7 @@ Object.defineProperty(Phaser.Text.prototype, "inputEnabled", {
846850
this.input.stop();
847851
}
848852
}
853+
849854
}
850855

851856
});

src/gameobjects/TileSprite.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,10 @@ Object.defineProperty(Phaser.TileSprite.prototype, "inputEnabled", {
675675
this.input = new Phaser.InputHandler(this);
676676
this.input.start();
677677
}
678+
else if (this.input && !this.input.enabled)
679+
{
680+
this.input.start();
681+
}
678682
}
679683
else
680684
{
@@ -683,6 +687,7 @@ Object.defineProperty(Phaser.TileSprite.prototype, "inputEnabled", {
683687
this.input.stop();
684688
}
685689
}
690+
686691
}
687692

688693
});

0 commit comments

Comments
 (0)