@Override public void present(float deltaTime) { GLCommon gl = Gdx.gl; gl.glClear(GL10.GL_COLOR_BUFFER_BIT); camera.update(); worldRender.render(deltaTime); if (isTreasure) { batcher.begin(); renderTreasure(treasureType); if (isTreasureSound) { Assets.playSound(Assets.treasureSound, game.soundState); isTreasureSound = false; } batcher.end(); } else if (isFinal) { batcher.begin(); renderFinal(); batcher.end(); } else { if (isPause && !isDialog) { batcher.begin(); renderGamePause(); batcher.end(); } } if ((isPause || !game.soundState) && bgMusic.isPlaying()) { bgMusic.pause(); } else if (!isPause && !bgMusic.isPlaying() && game.soundState) { Assets.playMusic(bgMusic, game.soundState); } }
public void musicPause() { preferences.putBoolean("musicOn", false); preferences.flush(); music.pause(); }
public void pauseMusic() { if (music != null && music.isPlaying()) { music.pause(); isMusicPaused = true; } }
public static void disable() { enabled = false; if (music != null) { music.pause(); } }
public static void pause() { if (music != null) { music.pause(); } }
@Override public void pause() { bgMusic.pause(); }