mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
implemented rubedoll direction flip and added meshIndex (z) swapping capability. #151
This commit is contained in:
parent
da7e0758bb
commit
fb3ac40d17
12 changed files with 483 additions and 389 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue