use of com.bladecoder.engine.model.MusicManager in project bladecoder-adventure-engine by bladecoder.
the class MusicAction method run.
@Override
public boolean run(VerbRunner cb) {
MusicManager musicEngine = World.getInstance().getMusicManager();
if (filename == null) {
musicEngine.setMusic(null);
} else {
MusicDesc md = new MusicDesc();
md.setFilename(filename);
md.setLoop(loop);
md.setInitialDelay(initialDelay);
md.setRepeatDelay(repeatDelay);
md.setStopWhenLeaving(stopWhenLeaving);
md.setVolume(volume);
musicEngine.setMusic(md);
}
return false;
}
Aggregations