+ 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 Answer
+ 5
I think one of them used for computer and another used for phone. onkeydown for computer and ontouchstart for phone.