near-trigger works?

This commit is contained in:
Seth Alves 2017-08-15 14:53:58 -07:00
parent 03977334a0
commit 4bfbab294d

View file

@ -1,6 +1,6 @@
"use strict"; "use strict";
// nearParentGrabEntity.js // nearTrigger.js
// //
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
@ -100,17 +100,17 @@ Script.include("/~/system/controllers/controllerDispatcherUtils.js");
}; };
} }
var leftNearParentingGrabEntity = new NearTriggerEntity(LEFT_HAND); var leftNearTriggerEntity = new NearTriggerEntity(LEFT_HAND);
var rightNearParentingGrabEntity = new NearTriggerEntity(RIGHT_HAND); var rightNearTriggerEntity = new NearTriggerEntity(RIGHT_HAND);
enableDispatcherModule("LeftNearParentingGrabEntity", leftNearParentingGrabEntity); enableDispatcherModule("LeftNearTriggerEntity", leftNearTriggerEntity);
enableDispatcherModule("RightNearParentingGrabEntity", rightNearParentingGrabEntity); enableDispatcherModule("RightNearTriggerEntity", rightNearTriggerEntity);
this.cleanup = function () { this.cleanup = function () {
leftNearParentingGrabEntity.cleanup(); leftNearTriggerEntity.cleanup();
rightNearParentingGrabEntity.cleanup(); rightNearTriggerEntity.cleanup();
disableDispatcherModule("LeftNearParentingGrabEntity"); disableDispatcherModule("LeftNearTriggerEntity");
disableDispatcherModule("RightNearParentingGrabEntity"); disableDispatcherModule("RightNearTriggerEntity");
}; };
Script.scriptEnding.connect(this.cleanup); Script.scriptEnding.connect(this.cleanup);
}()); }());