Skip to content
Snippets Groups Projects
Commit 397ffa05 authored by Turid Cecilie Dahl's avatar Turid Cecilie Dahl
Browse files

Merge branch '85-add-more-sound-effects' into 'dev'

Resolve "Add more sound effects"

Closes #85

See merge request !82
parents e7ec62d9 116674cf
Branches
No related tags found
1 merge request!82Resolve "Add more sound effects"
File added
......@@ -66,6 +66,7 @@ public class PauseState extends State {
if(this.needsConfirmation) {
// User doesn't want to exit after all
if(this.confirmationBox.noPressed(touchX, touchY)) {
if(GameWare.getInstance().getSoundEffects()){ pauseStateBtnSound.play(); }
this.needsConfirmation = false;
}
......@@ -87,6 +88,7 @@ public class PauseState extends State {
// First step of exiting; user now needs to confirm the exit via the popup
if(this.exitButton.isPressed(touchX, touchY)){
if(GameWare.getInstance().getSoundEffects()){ pauseStateBtnSound.play(); }
this.needsConfirmation = true;
}
}
......
......@@ -52,6 +52,7 @@ public abstract class State {
protected Sound buttonPressSound;
protected Sound checkBoxSound;
protected Sound pauseResumeBtnSound;
protected Sound pauseStateBtnSound;
// Variables
private boolean firstTimeRunningUpdate = true;
......@@ -63,7 +64,7 @@ public abstract class State {
this.buttonPressSound = Gdx.audio.newSound(Gdx.files.internal("sfx/button_press.ogg"));
this.checkBoxSound = Gdx.audio.newSound(Gdx.files.internal("sfx/check_box.ogg"));
this.pauseResumeBtnSound = Gdx.audio.newSound(Gdx.files.internal("sfx/pause_button.ogg"));
this.pauseStateBtnSound = Gdx.audio.newSound(Gdx.files.internal("sfx/small_click.ogg"));
Gdx.input.setInputProcessor(stage);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment