implemented rube doll to appear when dying

This commit is contained in:
logsol 2015-04-28 14:57:22 +02:00
parent c4fcb2fabf
commit b3fbf34cf7
5 changed files with 99 additions and 14 deletions

View file

@ -11,7 +11,7 @@ function (Parent, Layer, Settings, Nc) {
function RubeDoll(physicsEngine, uid, options) {
this.primaryColor = 0x008800;
this.primaryColor = options.primaryColor;
var limbOptions = {};
@ -160,6 +160,12 @@ function (Parent, Layer, Settings, Nc) {
};
RubeDoll.prototype.destroy = function() {
for (var name in this.limbMeshes) {
Nc.trigger(Nc.ns.client.view.mesh.remove, this.layerId, this.limbMeshes[name]);
};
Parent.prototype.destroy.call(this);
};
RubeDoll.prototype.render = function() {

View file

@ -83,10 +83,6 @@ function (Parent, Nc, Settings) {
}
};
Player.prototype.getNickname = function() {
return this.user.options.nickname;
};
Player.prototype.render = function() {
if(this.doll) {