From f85469b97e7ef8dbfec0b1878ee931ed2fb290ea Mon Sep 17 00:00:00 2001 From: Jeena Paradies Date: Sun, 22 Jul 2012 13:28:07 +0200 Subject: [PATCH] changed object create to Parent.prototype --- app/Game/Client/Collision/Detector.js | 2 +- app/Game/Client/GameController.js | 4 ++-- app/Game/Server/Collision/Detector.js | 2 +- app/Game/Server/GameController.js | 1 - 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/Game/Client/Collision/Detector.js b/app/Game/Client/Collision/Detector.js index dbf3528..4c0a0cc 100755 --- a/app/Game/Client/Collision/Detector.js +++ b/app/Game/Client/Collision/Detector.js @@ -10,7 +10,7 @@ function(Box2D, Parent) { this.me = me; } - Detector.prototype = Object.create(Parent); + Detector.prototype = Object.create(Parent.prototype); Detector.prototype.handleStand = function(point, isColliding) { if (point.GetFixtureA().GetUserData() == Detector.IDENTIFIER.PLAYER_FOOT_SENSOR diff --git a/app/Game/Client/GameController.js b/app/Game/Client/GameController.js index 74234a7..d2f35f6 100755 --- a/app/Game/Client/GameController.js +++ b/app/Game/Client/GameController.js @@ -9,7 +9,7 @@ define([ function(Parent, PhysicsEngine, ViewController, KeyboardController, requestAnimFrame) { function GameController () { - Parent.apply(this, new PhysicsEngine()); + Parent.call(this, new PhysicsEngine()); this.me = null; this.keyboardController = null; @@ -18,7 +18,7 @@ function(Parent, PhysicsEngine, ViewController, KeyboardController, requestAnimF this.update(); } - GameController.prototype = Object.create(Parent); + GameController.prototype = Object.create(Parent.prototype); GameController.prototype.getMe = function() { diff --git a/app/Game/Server/Collision/Detector.js b/app/Game/Server/Collision/Detector.js index 46b63ba..b3bd31f 100644 --- a/app/Game/Server/Collision/Detector.js +++ b/app/Game/Server/Collision/Detector.js @@ -9,7 +9,7 @@ function(Box2D, Parent) { Parent.call(this); } - Detector.prototype = Object.create(Parent); + Detector.prototype = Object.create(Parent.prototype); Detector.prototype.handleStand = function(point, isColliding) { throw "Implement this function"; diff --git a/app/Game/Server/GameController.js b/app/Game/Server/GameController.js index 3cc2bd4..e4aa2cc 100755 --- a/app/Game/Server/GameController.js +++ b/app/Game/Server/GameController.js @@ -19,7 +19,6 @@ function(Parent, PhysicsEngine, Settings, InputController, requestAnimFrame, Not } GameController.prototype = Object.create(Parent.prototype); - console.log(GameController.loadLevel); GameController.prototype.update = function() {