use of com.badlogic.gdx.audio.Music in project Catacomb-Snatch by Catacomb-Snatch.
the class GdxSoundPlayer method startEndMusic.
@Override
public void startEndMusic() {
stopBackgroundMusic();
stopTitleMusic();
Music endMusic = getMusic(Sounds.END_THEME);
if (endMusic == null) {
return;
}
if (musicVolume > 0.0f && !endMusic.isPlaying() && !paused) {
endMusic.setLooping(true);
endMusic.setVolume(musicVolume);
endMusic.play();
}
TheEndIsPlaying = true;
}
use of com.badlogic.gdx.audio.Music in project Catacomb-Snatch by Catacomb-Snatch.
the class GdxSoundPlayer method shutdown.
@Override
public void shutdown() {
Music music;
// unloading Title music
stopTitleMusic();
music = getMusic(Sounds.TITLE_THEME);
if (music != null) {
music.dispose();
}
// unloading End music
stopEndMusic();
music = getMusic(Sounds.END_THEME);
if (music != null) {
music.dispose();
}
// unloading Background music
stopBackgroundMusic();
for (Music m : backgroundMusicList) {
if (m.isPlaying())
m.stop();
m.dispose();
}
// unloading sounds
if (soundsMap.size > 0) {
for (Sound s : soundsMap.values()) {
s.stop();
s.dispose();
}
}
}
use of com.badlogic.gdx.audio.Music in project Catacomb-Snatch by Catacomb-Snatch.
the class GdxSoundPlayer method stopEndMusic.
@Override
public void stopEndMusic() {
Music endMusic = getMusic(Sounds.END_THEME);
if (endMusic == null) {
return;
}
if (endMusic.isPlaying()) {
endMusic.stop();
}
TheEndIsPlaying = false;
}
use of com.badlogic.gdx.audio.Music in project Catacomb-Snatch by Catacomb-Snatch.
the class GdxSoundPlayer method stopBackgroundMusic.
@Override
public void stopBackgroundMusic() {
if (backgroundPlaying < 0)
return;
for (Music m : backgroundMusicList) {
if (m.isPlaying())
m.stop();
}
backgroundPlaying = -1;
backgroundIsPlaying = false;
}
use of com.badlogic.gdx.audio.Music in project Catacomb-Snatch by Catacomb-Snatch.
the class GdxSoundPlayer method pauseBackgroundMusic.
@Override
public void pauseBackgroundMusic() {
paused = true;
if (backgroundPlaying >= 0)
backgroundMusicList.get(backgroundPlaying).pause();
Music music;
music = getMusic(Sounds.TITLE_THEME);
if (music != null && TitleIsPlaying) {
music.pause();
}
music = getMusic(Sounds.END_THEME);
if (music != null && TheEndIsPlaying) {
music.pause();
}
}
Aggregations