implemented rube doll to appear when dying

This commit is contained in:
logsol 2015-04-28 14:57:22 +02:00
parent cd956b8a28
commit 2dea240a4b
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() {