implemented level restart

This commit is contained in:
Jeena 2014-01-12 04:33:08 +01:00
parent 81611050d2
commit 3edd664412
12 changed files with 104 additions and 47 deletions

View file

@ -20,6 +20,8 @@ function (Box2D, Exception) {
GameObject.prototype.destroy = function() {
if(this.body instanceof Box2D.Dynamics.b2Body) {
this.body.GetWorld().DestroyBody(this.body);
} else {
throw new Exception("can not destroy body");
}
};