mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 18:47:35 +00:00
implemented rube doll to appear when dying
This commit is contained in:
parent
c4fcb2fabf
commit
b3fbf34cf7
5 changed files with 99 additions and 14 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -83,10 +83,6 @@ function (Parent, Nc, Settings) {
|
|||
}
|
||||
};
|
||||
|
||||
Player.prototype.getNickname = function() {
|
||||
return this.user.options.nickname;
|
||||
};
|
||||
|
||||
Player.prototype.render = function() {
|
||||
|
||||
if(this.doll) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue