console.log, checkpoint and code cleanup

This commit is contained in:
logsol 2014-03-31 05:06:52 +02:00
parent 39f684315b
commit 55b56f9c12
4 changed files with 31 additions and 29 deletions

View file

@ -362,13 +362,15 @@ function (Parent, Box2D, Settings, Nc) {
};
RagDoll.prototype.destroy = function() {
Nc.trigger(Nc.ns.core.game.gameObject.remove, 'animated', this);
var world = this.body.GetWorld();
Parent.prototype.destroy.call(this);
for (var name in this.limbs) {
world.DestroyBody(this.limbs[name]);
}
Parent.prototype.destroy.call(this);
};
return RagDoll;