mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
This commit is contained in:
parent
039213cf50
commit
55256ada95
23 changed files with 409 additions and 110 deletions
|
|
@ -3,10 +3,11 @@ define([
|
|||
"Lib/Vendor/Box2D",
|
||||
"Game/Config/Settings",
|
||||
"Game/" + GLOBALS.context + "/Collision/Detector",
|
||||
"Game/" + GLOBALS.context + "/GameObjects/Item"
|
||||
"Game/" + GLOBALS.context + "/GameObjects/Item",
|
||||
"Lib/Utilities/NotificationCenter"
|
||||
],
|
||||
|
||||
function (Parent, Box2D, Settings, CollisionDetector, Item) {
|
||||
function (Parent, Box2D, Settings, CollisionDetector, Item, Nc) {
|
||||
|
||||
function Doll (physicsEngine, uid, player) {
|
||||
|
||||
|
|
@ -36,6 +37,8 @@ function (Parent, Box2D, Settings, CollisionDetector, Item) {
|
|||
|
||||
this.createFixtures();
|
||||
this.body.SetActive(false);
|
||||
|
||||
Nc.trigger(Nc.ns.core.game.gameObject.add, 'animated', this);
|
||||
}
|
||||
|
||||
Doll.prototype = Object.create(Parent.prototype);
|
||||
|
|
@ -368,5 +371,9 @@ function (Parent, Box2D, Settings, CollisionDetector, Item) {
|
|||
}
|
||||
};
|
||||
|
||||
Doll.prototype.destroy = function() {
|
||||
Nc.trigger(Nc.ns.core.game.gameObject.remove, 'animated', this);
|
||||
};
|
||||
|
||||
return Doll;
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue