+ 2
Game design with JS
I’m at the second last code repo called “user input”. I’m supposed to make the circle move when using the following code: document.onkeydown = function() { count += 1; y -= 25; } document.ontouchstart = function() { count += 1; y -= 25; } However, im also supposed to remove the original jump button and I’m finding it difficult to know what to remove. I don’t necessarily want to paste all the code here, but if anyone has completed the code repo, please let me know how this part works? Thank you!
1 Réponse
+ 5
I think one of them used for computer and another used for phone. onkeydown for computer and ontouchstart for phone.