I am trying to make a game where the right combination of numbers gives the player an effect to help them pass the level. My plan for doing this was using if statements to test for the key being pressed and change variables accordingly. This should be very simple, but my attempts have failed miserably, while I cannot find any pages that adequately explain this. So, does anyone know how I can detect the press of a number key for an if statement in javascript?
Aucun commentaire:
Enregistrer un commentaire