résolution de certains bugs (problème la musique du menu de pause prend la place de celle de la game)
This commit is contained in:
parent
a222e787a7
commit
ad4b9ffb99
|
@ -48,11 +48,13 @@ public class GameScreen extends BaseScreen implements InputProcessor {
|
|||
@Override
|
||||
public void initialize() {
|
||||
|
||||
if (SagittariusGame.music.isPlaying()){
|
||||
if (!SagittariusGame.disableMusic){
|
||||
|
||||
SagittariusGame.music.stop();
|
||||
SagittariusGame.music = Gdx.audio.newMusic(Gdx.files.internal("core/assets/sounds/HMO-MercuryCity.mp3"));
|
||||
SagittariusGame.music.setLooping(true);
|
||||
SagittariusGame.music.play();
|
||||
|
||||
}
|
||||
|
||||
Gdx.input.setInputProcessor(this);
|
||||
|
|
|
@ -24,11 +24,12 @@ public class ResumeScreen extends BaseScreen {
|
|||
@Override
|
||||
public void initialize() {
|
||||
|
||||
if (!SagittariusGame.disableMusic){
|
||||
SagittariusGame.music.stop();
|
||||
SagittariusGame.music = Gdx.audio.newMusic(Gdx.files.internal("core/assets/sounds/Metre - Concentric.mp3"));
|
||||
SagittariusGame.music.setLooping(true);
|
||||
SagittariusGame.music.play();
|
||||
|
||||
}
|
||||
Gdx.input.setInputProcessor(uiStage);
|
||||
|
||||
// Table creation
|
||||
|
@ -63,10 +64,12 @@ public class ResumeScreen extends BaseScreen {
|
|||
// Deactivate music or not
|
||||
if (disableMusic.isChecked() && SagittariusGame.music.isPlaying()){
|
||||
SagittariusGame.music.stop();
|
||||
SagittariusGame.disableMusic = true;
|
||||
}
|
||||
|
||||
else if (!disableMusic.isChecked() && ! SagittariusGame.music.isPlaying()){
|
||||
SagittariusGame.music.play();
|
||||
SagittariusGame.disableMusic = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -18,10 +18,12 @@ public class SettingsScreen extends BaseScreen {
|
|||
@Override
|
||||
public void initialize() {
|
||||
|
||||
if (!SagittariusGame.disableMusic){
|
||||
SagittariusGame.music.stop();
|
||||
SagittariusGame.music = Gdx.audio.newMusic(Gdx.files.internal("core/assets/sounds/Metre - Concentric.mp3"));
|
||||
SagittariusGame.music.setLooping(true);
|
||||
SagittariusGame.music.play();
|
||||
}
|
||||
|
||||
Gdx.input.setInputProcessor(uiStage);
|
||||
|
||||
|
@ -67,10 +69,12 @@ public class SettingsScreen extends BaseScreen {
|
|||
// Deactivate music or not
|
||||
if (disableMusic.isChecked() && SagittariusGame.music.isPlaying()){
|
||||
SagittariusGame.music.stop();
|
||||
SagittariusGame.disableMusic = true;
|
||||
}
|
||||
|
||||
else if (!disableMusic.isChecked() && ! SagittariusGame.music.isPlaying()){
|
||||
SagittariusGame.music.play();
|
||||
SagittariusGame.disableMusic = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue