implemented rubedoll direction flip and added meshIndex (z) swapping capability. #151

This commit is contained in:
logsol 2015-04-29 00:04:17 +02:00
parent 0da744f5fd
commit a5f45ffef6
12 changed files with 483 additions and 389 deletions

View file

@ -9,10 +9,20 @@ function (Parent, Settings, Nc) {
"use strict";
function RubeDoll(physicsEngine, uid, options) {
this.scheduledForDestruction = false;
this.destructionTimeout = null;
Parent.call(this, physicsEngine, uid, options);
}
RubeDoll.prototype = Object.create(Parent.prototype);
RubeDoll.prototype.beingGrabbed = function(player) {
Parent.prototype.beingGrabbed.call(this, player);
if(this.scheduledForDestruction) {
clearTimeout(this.destructionTimeout);
}
};
RubeDoll.prototype.beingReleased = function(player) {
Parent.prototype.beingReleased.call(this, player);