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
|
|
@ -40,7 +40,6 @@ function (Doll, Settings, Nc, Exception, SpectatorDoll, RagDoll) {
|
|||
this.doll = new Doll(this.physicsEngine, "doll-" + this.id, this);
|
||||
this.doll.spawn(x, y);
|
||||
this.isSpawned = true;
|
||||
Nc.trigger(Nc.ns.core.game.gameObject.add, 'animated', this.doll);
|
||||
}
|
||||
|
||||
Player.prototype.getPosition = function () {
|
||||
|
|
@ -120,14 +119,13 @@ function (Doll, Settings, Nc, Exception, SpectatorDoll, RagDoll) {
|
|||
|
||||
this.isSpawned = false;
|
||||
|
||||
Nc.trigger(Nc.ns.core.game.gameObject.remove, 'animated', this.doll);
|
||||
this.doll.destroy();
|
||||
this.doll = null;
|
||||
|
||||
this.ragDoll = ragDoll;
|
||||
|
||||
|
||||
Nc.trigger(Nc.ns.core.game.player.killed, this);
|
||||
Nc.trigger(Nc.ns.core.game.player.killed, this, killedByPlayer);
|
||||
};
|
||||
|
||||
Player.prototype.update = function () {
|
||||
|
|
@ -148,7 +146,6 @@ function (Doll, Settings, Nc, Exception, SpectatorDoll, RagDoll) {
|
|||
|
||||
this.spectatorDoll.destroy();
|
||||
if(this.doll) this.doll.destroy();
|
||||
if(this.ragDoll) this.ragDoll.destroy();
|
||||
}
|
||||
|
||||
Player.prototype.setPlayerController = function(playerController) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue