Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public boolean collides(Enemy enemy) {
- if (position.x < enemy.getX() + enemy.getWidth()) {
- return (Intersector.overlaps(enemy.getBounds(), getBounds())
- || Intersector.overlaps(enemy.getBounds(), getBounds())
- || Intersector.overlaps(enemy.getBounds(), getBounds())
- || Intersector.overlaps(enemy.getBounds(), getBounds()));
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement