mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 18:47:35 +00:00
added Constants module. fixes #4
This commit is contained in:
parent
f3e186afb1
commit
3c1e7008e5
4 changed files with 29 additions and 13 deletions
|
|
@ -1,4 +1,4 @@
|
|||
define(["Vendor/Box2D"], function(Box2D) {
|
||||
define(["Vendor/Box2D", "Chuck/Constants"], function(Box2D, Constants) {
|
||||
|
||||
function Detector(me) {
|
||||
this.me = me;
|
||||
|
|
@ -15,7 +15,9 @@ define(["Vendor/Box2D"], function(Box2D) {
|
|||
}
|
||||
|
||||
Detector.prototype.handleStand = function(point, isColliding) {
|
||||
if (point.GetFixtureA().GetUserData() == 'myFeet' || point.GetFixtureB().GetUserData() == 'myFeet') {
|
||||
if (point.GetFixtureA().GetUserData() == Constants.COLLISION_IDENTIFIER_FOOTSENSOR
|
||||
|| point.GetFixtureB().GetUserData() == Constants.COLLISION_IDENTIFIER_FOOTSENSOR) {
|
||||
|
||||
this.me.onFootSensorDetection(isColliding);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue