Hi guys,
trying to kill an enemy when the hero jumps on it. I have this so far, but its not working correct:
Can someone help me out?
1 2 3 4 5 6 7 8 | public void collisionDetection(){ Actor Mario = getOneIntersectingObject(Mario. class ); if ((Mario != null ) && (Mario.getY() >= this .getY()- 10 ) ) { getWorld().removeObject( this ); } } |