mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
new system for synchronizing game objects. fixes #74
This commit is contained in:
parent
3ef3a6abf9
commit
07dad646cf
19 changed files with 194 additions and 162 deletions
|
|
@ -27,7 +27,7 @@ function (Parent, Exception, Nc) {
|
|||
GameObject.prototype.createMesh = function() {
|
||||
throw new Exception('Abstract method GameObject.createMesh not overwritten');
|
||||
};
|
||||
|
||||
|
||||
return GameObject;
|
||||
|
||||
});
|
||||
|
|
@ -12,6 +12,8 @@ function (Parent, Settings, Nc, Layer) {
|
|||
function Item(physicsEngine, uid, options) {
|
||||
this.layerId = Layer.ID.ITEM;
|
||||
Parent.call(this, physicsEngine, uid, options);
|
||||
|
||||
Nc.on(Nc.ns.client.game.events.render, this.render, this);
|
||||
}
|
||||
|
||||
Item.prototype = Object.create(Parent.prototype);
|
||||
|
|
|
|||
|
|
@ -189,8 +189,6 @@ function (Parent, Layer, Settings, Nc) {
|
|||
RubeDoll.prototype.flip = function(direction) {
|
||||
Parent.prototype.flip.call(this, direction);
|
||||
|
||||
console.log("last", this.lastFlipDirection, "now", direction);
|
||||
|
||||
// flipping depth of right body side arm/leg images with left
|
||||
if (this.lastFlipDirection != direction) { // FIXME : this is a bit broken.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue