lundi 1 janvier 2018

While HTML-button pressed

I made a game in HTML for my website which works perfectly fine on PC, but now I would like it to be compatible with mobile devices too. Since you don't have a psysical keybaord to move the player around with, I would like a function to be triggered while one of four directional HTML-buttons is pressed. Is there a way to do this without the player constantly needing to re-press the same button? Something like: "while button pressed" --> "run this function"




Aucun commentaire:

Enregistrer un commentaire