Hey all :),
Can someone help me with my problem. I have got my intersecting objects following my boat so far, but I also want my boat to sink en when that happens the objects that are in the boat (intersecting) have to sink with it. The last part is my problem.
Can some one help me with this.
My code:
Thanks.
public boolean isOverWeight() { List<Persoon> personen = (List<Persoon>)getIntersectingObjects(Persoon.class); int currentWeight = 0; for (Persoon persoon : personen) { currentWeight += persoon.getWeight() ; } if (currentWeight >= 100) { setLocation (getX(), getY() +1); //setLocation (List<Persoon>)getIntersectingObjects(Persoon.class) (getX() getY() +5); } else if (currentWeight >= 200) { setLocation (getX(), getY() +1); //setLocation (List<Persoon>)getIntersectingObjects(Persoon.class) (getX() getY() +5); } return currentWeight > 300; }