Two more pages need to fix.
In the 6th Chapter “Finally”, two links are broken now.
And, I think may be you forget to use the AudioNode of ExplosionAppState.class . So I add it myself.
public void initialize(AppStateManager stateManager, Application app) {
super.initialize(stateManager, app);
this.app = (SimpleApplication) app;
this.ed = this.app.getStateManager().getState(EntityDataState.class).getEntityData();
this.entities = this.ed.getEntities(Die.class, Position.class);
this.sound = new AudioNode(app.getAssetManager(), "Sounds/Explosion.wav", DataType.Buffer); // <---------
}
private void addModels(Set<Entity> entities) {
for (Entity e : entities) {
ParticleEmitter emitter = createExplosion();
models.put(e.getId(), emitter);
updateEffects(e, emitter);
this.app.getRootNode().attachChild(emitter);
this.sound.playInstance(); // <--------
}
}