Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Iterator<Enemy> i = rx.iterator();
- while (i.hasNext()) {
- Enemy sp = i.next();
- if ((Math.abs(sp.x - p.x) <= ((sp.width + p.width) / 2f))
- && (Math.abs(sp.y - p.y) <= ((sp.height + p.height) / 2f))) {
- i.remove();
- }
- }
- // p - player
- // sp - enemy
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement