public void renderZombies() { for (Zombie zombie : zombies) { zombie.calculateMid(); zombie.updatePosition(); zombie.drawZombie(); } }
private boolean checkShootZombie(float x, float y, float z) { Zombie shot = null; for (Zombie zombie : zombies) { if (zombie.collisionShoot(x, y, z)) { shot = zombie; break; } } if (shot != null) { zombies.remove(shot); return true; } return false; }