mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
new system for synchronizing game objects. fixes #74
This commit is contained in:
parent
3ef3a6abf9
commit
07dad646cf
19 changed files with 194 additions and 162 deletions
|
|
@ -41,7 +41,7 @@ function (Parent, Box2D, Options, Settings, Exception, Nc, Assert) {
|
|||
this.body.SetBullet(true);
|
||||
}
|
||||
|
||||
Nc.trigger(Nc.ns.core.game.gameObject.add, "animated", this);
|
||||
Nc.trigger(Nc.ns.core.game.worldUpdateObjects.add, this);
|
||||
}
|
||||
|
||||
Item.prototype = Object.create(Parent.prototype);
|
||||
|
|
@ -158,7 +158,7 @@ function (Parent, Box2D, Options, Settings, Exception, Nc, Assert) {
|
|||
};
|
||||
|
||||
Item.prototype.destroy = function() {
|
||||
Nc.trigger(Nc.ns.core.game.gameObject.remove, "animated", this);
|
||||
Nc.trigger(Nc.ns.core.game.worldUpdateObjects.remove, this);
|
||||
Parent.prototype.destroy.call(this);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue