mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 18:47:35 +00:00
implemented level restart
This commit is contained in:
parent
81611050d2
commit
3edd664412
12 changed files with 104 additions and 47 deletions
|
|
@ -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");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue