We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0a1e4e0 commit 562eb4aCopy full SHA for 562eb4a
1 file changed
v3/src/gameobjects/GameObject.js
@@ -24,8 +24,12 @@ var GameObject = new Class({
24
this.renderMask = 15;
25
this.renderFlags = 15;
26
27
+ // instance of Phaser.Input.InteractiveObject if input enabled
28
this.input = null;
29
30
+ // instance of Phaser.Physics.X.Body if physics enabled (X = the physics system being used by the Scene)
31
+ this.body = null;
32
+
33
// Trigger a scene z-depth sort
34
this.scene.sys.sortChildrenFlag = true;
35
},
@@ -80,6 +84,11 @@ var GameObject = new Class({
80
84
this.scene.sys.inputManager.clear(this);
81
85
}
82
86
87
+ if (this.body)
88
+ {
89
+ this.scene.sys.physicsManager.remove(this);
90
+ }
91
83
92
this.active = false;
93
94
this.scene = undefined;
0 commit comments