Beispiel #1
0
 public void renderZombies() {
   for (Zombie zombie : zombies) {
     zombie.calculateMid();
     zombie.updatePosition();
     zombie.drawZombie();
   }
 }
Beispiel #2
0
 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;
 }