Skip to content

Commit 80d28fe

Browse files
committed
Update app.js
1 parent 8f2e326 commit 80d28fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

games/GMTK Jam/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,8 +427,8 @@ app.ticker.add((deltaTime) => {
427427
score.text = "Round " + states.level + ", " + states.score + " points, " + states.dangerCount + " remaining";
428428

429429
if (states.life > 0) { // X velocity
430-
player.vec.x *= 1 - (0.2 * player.allowJump);
431-
player.vec.x += (states.speedMult * states.speed * player.allowJump * (PIXI.input.getKeyDown("arrowright") - PIXI.input.getKeyDown("arrowleft")));
430+
player.vec.x *= 1 - (0.2 * player.allowJump * deltaTime);
431+
player.vec.x += (states.speedMult * states.speed * player.allowJump * (PIXI.input.getKeyDown("arrowright") - PIXI.input.getKeyDown("arrowleft")) * deltaTime);
432432
player.vec.x = clamp(player.vec.x, (states.speed + 2) * -states.speedMult, (states.speed + 2) * states.speedMult);
433433

434434
// Y velocity

0 commit comments

Comments
 (0)