chuck.js/app/Game/Client/Collision/Detector.js
2012-07-28 13:54:49 +02:00

24 lines
No EOL
593 B
JavaScript
Executable file

define([
"Lib/Vendor/Box2D",
"Game/Core/Collision/Detector"
],
function (Box2D, Parent) {
function Detector (me) {
Parent.call(this);
this.me = me;
}
Detector.prototype = Object.create(Parent.prototype);
Detector.prototype.handleStand = function (point, isColliding) {
if (point.GetFixtureA().GetUserData() == Detector.IDENTIFIER.PLAYER_FOOT_SENSOR
|| point.GetFixtureB().GetUserData() == Detector.IDENTIFIER.PLAYER_FOOT_SENSOR) {
this.me.onFootSensorDetection(isColliding);
}
}
return Detector;
});