Fix cooldown

This commit is contained in:
Atlante45 2016-03-02 23:42:27 -08:00
parent bef2885957
commit d5d5eaaf9c

View file

@ -281,7 +281,9 @@
pipes = new Pipes(space.dimensions.x, space.dimensions.y, to3DPosition);
}
function inputs(triggerValue) {
if (triggerValue > TRIGGER_THRESHOLD && lastTriggerValue < TRIGGER_THRESHOLD) {
if (triggerValue > TRIGGER_THRESHOLD &&
lastTriggerValue < TRIGGER_THRESHOLD &&
(gameTime - lastLost) > coolDown) {
isJumping = true;
startedPlaying = true;
}