Search:

Type: Posts; User: albin1228

Search: Search took 0.17 seconds.

  1. Replies
    21
    Views
    1,298

    Re: Java problem. Thread wont stop

    Fixed. Im sorry for the long post and thank you for answering
  2. Replies
    21
    Views
    1,298

    Re: Java problem. Thread wont stop

    I was wrong
  3. Replies
    21
    Views
    1,298

    Re: Java problem. Thread wont stop

    Not yet but its getting there i think.
  4. Replies
    21
    Views
    1,298

    Re: Java problem. Thread wont stop

    Well i have changed everything with seperate variables to for example hero.x. Here is the code that makes the Player rectangle move:


    public void setXDirection(int xDir){
    this.xDir = xDir;
    }...
  5. Replies
    21
    Views
    1,298

    Re: Java problem. Thread wont stop

    This is some code i have for the rectangle:


    Rectangle hero;
    int heroX,heroY;
    int xDir, yDir;
    int width,height;
    heroX = 100;
    heroY = 100;
  6. Replies
    21
    Views
    1,298

    Re: Java problem. Thread wont stop

    Oh okay i will try that in a while

    --- Update ---

    When i do that it only displays the same coordinates all the time. Its like the rectangles i drew and created as objects arent the same. Im not...
  7. Replies
    21
    Views
    1,298

    Re: Java problem. Thread wont stop

    Do you mean like the x and y coordinates or?
  8. Replies
    21
    Views
    1,298

    Re: Java problem. Thread wont stop

    Im not even sure what im supposed to put and where. I have never debugged with println before and i have no idea what variables i should print and where even after i red your first post.
  9. Replies
    21
    Views
    1,298

    Re: Java problem. Thread wont stop

    I dont know what the problem is and i will probably just give up.
  10. Replies
    21
    Views
    1,298

    Re: Java problem. Thread wont stop

    Well i put a println in the following way:


    public void collision(){
    System.out.println("COLLISION");
    if(enemy.intersects(player.hero)){
    System.out.println("FALSE");
    isGoing = false;...
  11. Replies
    21
    Views
    1,298

    Re: Java problem. Thread wont stop

    Well i havenīt fixed the problem. But it seems if(enemy.intersects(player.hero)) is never true...

    --- Update ---

    This is so annoying. I cant find the problem! Why doesnīt the intersecs work!?
    ...
  12. Replies
    21
    Views
    1,298

    Java problem. Thread wont stop(FIXED)

    Hello again guys!(I wrote another post yesterday)
    I have encountered another problem. It is probably another one of these things were i forget to put some code in and it doesnīt work. Well the...
Results 1 to 12 of 12