Commit 3ec4879c authored by Benjamin Gallois's avatar Benjamin Gallois

Add touch

parent a585c638
......@@ -25,7 +25,7 @@ window.addEventListener("keyup", function(event) {
if (event.keyCode === 27) {
window.location.href = 'main.html';
}
if (event.keyCode === 32) {
if (event.keyCode === 13) {
if (stop){
moveInterval = setInterval(move, 10);
stop = false;
......@@ -35,6 +35,9 @@ window.addEventListener("keyup", function(event) {
stop = true;
}
}
if (event.keyCode === 32) {
velocity =- velocity;
}
if (event.keyCode === 39) {
velocity += 0.1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment