mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-22 22:24:38 +02:00
20 lines
695 B
JavaScript
20 lines
695 B
JavaScript
(function() {
|
|
this.equipped = false;
|
|
this.preload = function(entityID) {
|
|
this.entityID = entityID;
|
|
this.messageChannel = "STOPWATCH-" + entityID;
|
|
print("In stopwatch client", this.messageChannel);
|
|
};
|
|
this.startEquip = function(entityID, args) {
|
|
this.equipped = true;
|
|
};
|
|
this.continueEquip = function(entityID, args) {
|
|
var triggerValue = Controller.getValue(args[0] === 'left' ? Controller.Standard.LT : Controller.Standard.RT);
|
|
if (triggerValue > 0.5) {
|
|
Messages.sendMessage(messageChannel, 'click');
|
|
}
|
|
};
|
|
this.releaseEquip = function(entityID, args) {
|
|
this.equipped = false;
|
|
};
|
|
});
|