mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 05:33:35 +00:00
Destroying a Game Object will now call destroy on its physics body.
This commit is contained in:
parent
a0ec4c6d2a
commit
d72c7d501a
1 changed files with 1 additions and 3 deletions
|
@ -342,11 +342,9 @@ var GameObject = new Class({
|
|||
this.data = undefined;
|
||||
}
|
||||
|
||||
// TODO Keep a reference to the manager in Body, so body can remove itself, not via System
|
||||
if (this.body)
|
||||
{
|
||||
// sys.physicsManager.remove(this);
|
||||
|
||||
this.body.destroy();
|
||||
this.body = undefined;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue