Search in sources :

Example 1 with MusicManager

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;
}
Also used : MusicManager(com.bladecoder.engine.model.MusicManager) MusicDesc(com.bladecoder.engine.model.MusicDesc)

Aggregations

MusicDesc (com.bladecoder.engine.model.MusicDesc)1 MusicManager (com.bladecoder.engine.model.MusicManager)1