Search:

Type: Posts; User: Erko

Search: Search took 0.18 seconds.

  1. Replies
    7
    Views
    1,826

    Re: How can I improve on this?

    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.
  2. Replies
    7
    Views
    1,826

    Re: How can I improve on this?

    Ok so



    public void keyPressed(KeyEvent e){
    switch(keyPressed){
    //Move up
    case KeyEvent.VK_W:
    up = true;
    break;
  3. Replies
    7
    Views
    1,826

    Re: How can I improve on this?

    Yes I forgot the break; statement haha. and alright I'm an idiot I overlooked that statement.
  4. Replies
    7
    Views
    1,826

    Re: How can I improve on this?

    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");
    ...
  5. Replies
    7
    Views
    1,826

    How can I improve on this?

    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...
Results 1 to 5 of 5