mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 01:00:44 +02:00
clock working for one person- no baton yet
This commit is contained in:
parent
24ba70263c
commit
1645ace200
1 changed files with 19 additions and 12 deletions
|
@ -25,7 +25,7 @@
|
|||
return;
|
||||
}
|
||||
_this.clockBody = _this.userData.clockBody;
|
||||
Entities.editEntity(_this.clockBody, {animation: {running: true}});
|
||||
|
||||
Script.update.connect(_this.update);
|
||||
},
|
||||
|
||||
|
@ -50,18 +50,25 @@
|
|||
var seconds = date.getSeconds();
|
||||
var minutes = date.getMinutes();
|
||||
|
||||
if(seconds === 0 && (minutes === 23|| minutes === 24)) {
|
||||
if (seconds === 0 && minutes === 0) {
|
||||
_this.popCuckooOut();
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
popCuckooOut: function() {
|
||||
// We are at the top of the hour!
|
||||
print("TOP OF THE HOUR!");
|
||||
Entities.editEntity(_this.clockBody, {
|
||||
animation: {
|
||||
running: true
|
||||
}
|
||||
});
|
||||
_this.checkTime = false;
|
||||
Script.setTimeout(function() {
|
||||
_this.checkTime = true;
|
||||
_this.print("NOW WE CAN CHECK TIME AGAIN");
|
||||
}, _this.TIME_CHECK_REFRACTORY_PERIOD);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue