mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
implemented level restart
This commit is contained in:
parent
81611050d2
commit
3edd664412
12 changed files with 104 additions and 47 deletions
|
|
@ -22,9 +22,13 @@ define([
|
|||
this.createItems();
|
||||
}
|
||||
|
||||
Level.prototype.unload = function () {
|
||||
// TODO unload level from engine if necessary
|
||||
// Perhaps just remove all bodies?
|
||||
Level.prototype.destroy = function () {
|
||||
for (var key in this.gameObjects) {
|
||||
for (var i = 0; i < this.gameObjects[key].length; i++) {
|
||||
this.gameObjects[key][i].destroy();
|
||||
}
|
||||
//this.gameObjects[key] = [];
|
||||
}
|
||||
}
|
||||
|
||||
// Private
|
||||
|
|
@ -235,7 +239,7 @@ microwave: 3.744
|
|||
image:'skateboard.gif',
|
||||
type:'skateboard',
|
||||
category:'outdoor',
|
||||
weight: 5,
|
||||
weight: 1.5,
|
||||
width:26,
|
||||
height:6,
|
||||
x:200,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue