mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 18:47:35 +00:00
changed object create to Parent.prototype
This commit is contained in:
parent
76391c2c5e
commit
f85469b97e
4 changed files with 4 additions and 5 deletions
|
|
@ -10,7 +10,7 @@ function(Box2D, Parent) {
|
||||||
this.me = me;
|
this.me = me;
|
||||||
}
|
}
|
||||||
|
|
||||||
Detector.prototype = Object.create(Parent);
|
Detector.prototype = Object.create(Parent.prototype);
|
||||||
|
|
||||||
Detector.prototype.handleStand = function(point, isColliding) {
|
Detector.prototype.handleStand = function(point, isColliding) {
|
||||||
if (point.GetFixtureA().GetUserData() == Detector.IDENTIFIER.PLAYER_FOOT_SENSOR
|
if (point.GetFixtureA().GetUserData() == Detector.IDENTIFIER.PLAYER_FOOT_SENSOR
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ define([
|
||||||
function(Parent, PhysicsEngine, ViewController, KeyboardController, requestAnimFrame) {
|
function(Parent, PhysicsEngine, ViewController, KeyboardController, requestAnimFrame) {
|
||||||
|
|
||||||
function GameController () {
|
function GameController () {
|
||||||
Parent.apply(this, new PhysicsEngine());
|
Parent.call(this, new PhysicsEngine());
|
||||||
|
|
||||||
this.me = null;
|
this.me = null;
|
||||||
this.keyboardController = null;
|
this.keyboardController = null;
|
||||||
|
|
@ -18,7 +18,7 @@ function(Parent, PhysicsEngine, ViewController, KeyboardController, requestAnimF
|
||||||
this.update();
|
this.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
GameController.prototype = Object.create(Parent);
|
GameController.prototype = Object.create(Parent.prototype);
|
||||||
|
|
||||||
|
|
||||||
GameController.prototype.getMe = function() {
|
GameController.prototype.getMe = function() {
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ function(Box2D, Parent) {
|
||||||
Parent.call(this);
|
Parent.call(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Detector.prototype = Object.create(Parent);
|
Detector.prototype = Object.create(Parent.prototype);
|
||||||
|
|
||||||
Detector.prototype.handleStand = function(point, isColliding) {
|
Detector.prototype.handleStand = function(point, isColliding) {
|
||||||
throw "Implement this function";
|
throw "Implement this function";
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ function(Parent, PhysicsEngine, Settings, InputController, requestAnimFrame, Not
|
||||||
}
|
}
|
||||||
|
|
||||||
GameController.prototype = Object.create(Parent.prototype);
|
GameController.prototype = Object.create(Parent.prototype);
|
||||||
console.log(GameController.loadLevel);
|
|
||||||
|
|
||||||
GameController.prototype.update = function() {
|
GameController.prototype.update = function() {
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue