Skip to content

Commit

Permalink
add mousedown listener (touch screens)
Browse files Browse the repository at this point in the history
  • Loading branch information
csaez committed Oct 4, 2017
1 parent ebd03b9 commit 9e0a3d2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions game.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ function gen_pipe_sprite(each_pipe) {
window.onload=function() {
init_game();
document.addEventListener("keydown", keyPush);
document.addEventListener("mousedown", keyPush);
setInterval(game, 1000/world.FPS)
}

Expand Down

0 comments on commit 9e0a3d2

Please sign in to comment.