altered define paths

This commit is contained in:
logsol 2012-07-21 22:34:34 +02:00
parent 1a536f0fea
commit 0df0f2965c

9
app/Game/Client/Collision/Detector.js Normal file → Executable file
View file

@ -1,6 +1,7 @@
define(["Vendor/Box2D", "Chuck/Constants"], function(Box2D, Constants) { define(["Lib/Vendor/Box2D", "Game/Core/Collision/Detector"], function(Box2D, Parent) {
function Detector(me) { function Detector(me) {
Parent.apply(this);
this.me = me; this.me = me;
this.listener = new Box2D.Dynamics.b2ContactListener(); this.listener = new Box2D.Dynamics.b2ContactListener();
@ -10,13 +11,15 @@ define(["Vendor/Box2D", "Chuck/Constants"], function(Box2D, Constants) {
this.listener.EndContact = this.EndContact; this.listener.EndContact = this.EndContact;
} }
Detector.prototype = Object.create(Parent);
Detector.prototype.getListener = function() { Detector.prototype.getListener = function() {
return this.listener; return this.listener;
} }
Detector.prototype.handleStand = function(point, isColliding) { Detector.prototype.handleStand = function(point, isColliding) {
if (point.GetFixtureA().GetUserData() == Constants.COLLISION_IDENTIFIER_FOOTSENSOR if (point.GetFixtureA().GetUserData() == Detector.IDENTIFIER.PLAYER_FOOT_SENSOR
|| point.GetFixtureB().GetUserData() == Constants.COLLISION_IDENTIFIER_FOOTSENSOR) { || point.GetFixtureB().GetUserData() == Detector.IDENTIFIER.PLAYER_FOOT_SENSOR) {
this.me.onFootSensorDetection(isColliding); this.me.onFootSensorDetection(isColliding);
} }