Skip to content

Instantly share code, notes, and snippets.

@gornostay25
Last active September 12, 2021 18:57
Show Gist options
  • Save gornostay25/3889cfad924b1f85231a867a95be8295 to your computer and use it in GitHub Desktop.
Save gornostay25/3889cfad924b1f85231a867a95be8295 to your computer and use it in GitHub Desktop.
Chrome Dino slows down but doesn't die
//Paste this code into console (CTRL+Shift+I / F12)
function customGameOver(){
let timer;
return ()=>{
clearTimeout(timer);
timer = setTimeout(()=>{
this.playSound(this.soundFx.HIT);
let csp = this.currentSpeed;
if (csp/2 < 4){
this.setSpeed(4);
}else{
this.setSpeed(csp/2);
}
},25);
}
}
Runner.prototype.gameOver = customGameOver.apply(Runner.instance_);
//to restart
// Runner.prototype.restart.apply(Runner.instance_);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment