mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 05:24:35 +02:00
update cuckoo clock lock
This commit is contained in:
parent
6781a7cb91
commit
f5f603f56e
1 changed files with 3 additions and 7 deletions
|
@ -25,7 +25,7 @@
|
||||||
var CUCKOO_SOUND_URL = "atp:/cuckooClock/cuckoomix.wav";
|
var CUCKOO_SOUND_URL = "atp:/cuckooClock/cuckoomix.wav";
|
||||||
CuckooClockMinuteHand = function() {
|
CuckooClockMinuteHand = function() {
|
||||||
_this = this;
|
_this = this;
|
||||||
_this.TIME_CHECK_REFRACTORY_PERIOD = 5000;
|
_this.TIME_LOCK_DURATION = 300000;
|
||||||
_this.checkTime = true;
|
_this.checkTime = true;
|
||||||
_this.cuckooSound = SoundCache.getSound(CUCKOO_SOUND_URL);
|
_this.cuckooSound = SoundCache.getSound(CUCKOO_SOUND_URL);
|
||||||
_this.CUCKOO_SOUND_VOLUME = 0.1;
|
_this.CUCKOO_SOUND_VOLUME = 0.1;
|
||||||
|
@ -134,10 +134,6 @@
|
||||||
if (minutes % 15 === 0 && seconds === 0) {
|
if (minutes % 15 === 0 && seconds === 0) {
|
||||||
_this.locked = true;
|
_this.locked = true;
|
||||||
_this.popCuckooOut();
|
_this.popCuckooOut();
|
||||||
_this.setTimeout(function(){
|
|
||||||
//five minute cooldown
|
|
||||||
_this.locked=false;
|
|
||||||
},300000)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -165,7 +161,7 @@
|
||||||
});
|
});
|
||||||
Script.setTimeout(function() {
|
Script.setTimeout(function() {
|
||||||
_this.checkTime = true;
|
_this.checkTime = true;
|
||||||
}, _this.TIME_CHECK_REFRACTORY_PERIOD);
|
}, _this.TIME_LOCK_DURATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue