private void clearProjectiles() {
        for (int i = 0; i < projectiles.size(); i++) {
            Projectile p = projectiles.get(i);
            if (p.isRemoved()) {
                projectiles.remove(i);
            }
        }
    }