mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 12:23:24 +02:00
Couple trigger value fixes
This commit is contained in:
parent
811ed91e02
commit
48fe9b343e
1 changed files with 7 additions and 6 deletions
|
@ -189,13 +189,13 @@
|
|||
|
||||
// Game loop setup
|
||||
var timestamp = 0;
|
||||
this.idle = function() {
|
||||
this.idle = function(triggerValue) {
|
||||
var now = Date.now();
|
||||
var deltaTime = (now - timestamp) / 1000.0;
|
||||
if (timestamp === 0) {
|
||||
deltaTime = 0;
|
||||
}
|
||||
inputs();
|
||||
inputs(triggerValue);
|
||||
update(deltaTime);
|
||||
draw();
|
||||
timestamp = now;
|
||||
|
@ -251,8 +251,10 @@
|
|||
pipes = new Pipes(space.dimensions.x, space.dimensions.y, to3DPosition);
|
||||
}
|
||||
function inputs(triggerValue) {
|
||||
isJumping = true;
|
||||
startedPlaying = true;
|
||||
if (triggerValue > 0.5) {
|
||||
isJumping = true;
|
||||
startedPlaying = true;
|
||||
}
|
||||
}
|
||||
function update(deltaTime) {
|
||||
//print("update: " + deltaTime);
|
||||
|
@ -426,8 +428,7 @@
|
|||
return;
|
||||
}
|
||||
this.triggerValue = Controller.getValue(TRIGGER_CONTROLS[this.hand]);
|
||||
|
||||
this.game.idle();
|
||||
this.game.idle(this.triggerValue);
|
||||
},
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue