I made a javascript game and I was wondering how can I adapt it so I can play this game on mobile too.
All I want is to replace arrow keys events with mobile swipes;
My moving function looks like this:
switch (e.keyCode) {
case 37:
//do this
case 38:
//do this
case 39:
//do this
case 40:
//do this
}
How can I add another switch case for swipe down (from a mobile device) is it hard to do?
PS preferably without jQuery