Ahhh I didn't even think of that I was wondering what to use haha, well thank you it makes perfect sense to you use that since thats what you use to find which key is pressed if I'm right.
Type: Posts; User: Erko
Ahhh I didn't even think of that I was wondering what to use haha, well thank you it makes perfect sense to you use that since thats what you use to find which key is pressed if I'm right.
Ok so
public void keyPressed(KeyEvent e){
switch(keyPressed){
//Move up
case KeyEvent.VK_W:
up = true;
break;
Yes I forgot the break; statement haha. and alright I'm an idiot I overlooked that statement.
Thank you for the reply. Also uhhm how would I use a switch case? I've only ever used them with variables like
switch(age){
case 16:
System.out.println("You are under 18");
...
I'm not sure if this is the right thread, but I'm not sure where to post. I just want information on things like if I'm writing it in a bad way or maybe theres an easier way.
PLEASE DON'T GIVE ME...