Answer the question
In order to leave comments, you need to log in
How to make a shot function?
Made a small game https://codepen.io/wan140/pen/GXBLgj?editors=0110. I want to add a shot function, but I understand that this cannot be done with ordinary timers. I heard that they do it with requestAnimationFrame, but I don't know how.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question