mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-17 04:09:39 +02:00
Fix typo.
This commit is contained in:
parent
1b628bc8e5
commit
ec0cf3ee3a
1 changed files with 62 additions and 61 deletions
|
@ -11,13 +11,13 @@
|
||||||
Script.include("/~/system/libraries/controllerDispatcherUtils.js");
|
Script.include("/~/system/libraries/controllerDispatcherUtils.js");
|
||||||
Script.include("/~/system/libraries/controllers.js");
|
Script.include("/~/system/libraries/controllers.js");
|
||||||
|
|
||||||
(function() { // BEGIN LOCAL_SCOPE
|
(function () { // BEGIN LOCAL_SCOPE
|
||||||
function PushToTalkHandler() {
|
function PushToTalkHandler() {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
this.active = false;
|
this.active = false;
|
||||||
//var pttMapping, mappingName;
|
//var pttMapping, mappingName;
|
||||||
|
|
||||||
this.setup = function() {
|
this.setup = function () {
|
||||||
//mappingName = 'Hifi-PTT-Dev-' + Math.random();
|
//mappingName = 'Hifi-PTT-Dev-' + Math.random();
|
||||||
//pttMapping = Controller.newMapping(mappingName);
|
//pttMapping = Controller.newMapping(mappingName);
|
||||||
//pttMapping.enable();
|
//pttMapping.enable();
|
||||||
|
@ -37,7 +37,7 @@ Script.include("/~/system/libraries/controllers.js");
|
||||||
this.isReady = function (controllerData, deltaTime) {
|
this.isReady = function (controllerData, deltaTime) {
|
||||||
if (HMD.active && Audio.pushToTalk && this.shouldTalk(controllerData)) {
|
if (HMD.active && Audio.pushToTalk && this.shouldTalk(controllerData)) {
|
||||||
Audio.pushingToTalk = true;
|
Audio.pushingToTalk = true;
|
||||||
returnMakeRunningValues(true, [], []);
|
return makeRunningValues(true, [], []);
|
||||||
}
|
}
|
||||||
|
|
||||||
return makeRunningValues(false, [], []);
|
return makeRunningValues(false, [], []);
|
||||||
|
@ -46,6 +46,7 @@ Script.include("/~/system/libraries/controllers.js");
|
||||||
this.run = function (controllerData, deltaTime) {
|
this.run = function (controllerData, deltaTime) {
|
||||||
if (this.shouldStopTalking(controllerData) || !Audio.pushToTalk) {
|
if (this.shouldStopTalking(controllerData) || !Audio.pushToTalk) {
|
||||||
Audio.pushingToTalk = false;
|
Audio.pushingToTalk = false;
|
||||||
|
print("Stop pushing to talk.");
|
||||||
return makeRunningValues(false, [], []);
|
return makeRunningValues(false, [], []);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,7 +67,7 @@ Script.include("/~/system/libraries/controllers.js");
|
||||||
var pushToTalk = new PushToTalkHandler();
|
var pushToTalk = new PushToTalkHandler();
|
||||||
enableDispatcherModule("PushToTalk", pushToTalk);
|
enableDispatcherModule("PushToTalk", pushToTalk);
|
||||||
|
|
||||||
function cleanup () {
|
function cleanup() {
|
||||||
pushToTalk.cleanup();
|
pushToTalk.cleanup();
|
||||||
disableDispatcherModule("PushToTalk");
|
disableDispatcherModule("PushToTalk");
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue