File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments