Advertisement
progrmor

Untitled

May 13th, 2014
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. public boolean collides(Enemy enemy) {
  2. if (position.x < enemy.getX() + enemy.getWidth()) {
  3. return (Intersector.overlaps(enemy.getBounds(), getBounds())
  4. || Intersector.overlaps(enemy.getBounds(), getBounds())
  5. || Intersector.overlaps(enemy.getBounds(), getBounds())
  6. || Intersector.overlaps(enemy.getBounds(), getBounds()));
  7. }
  8. return false;
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement