Audio stopt bij wisselen tussen schermen

This commit is contained in:
Bilel Bghiel
2015-06-18 16:24:03 +02:00
parent 1f44b5b487
commit d1a4ccf150
2 changed files with 6 additions and 0 deletions
+4
View File
@@ -40,7 +40,11 @@ public class GameStateManager {
public void setState(State st)
{
if (st.ordinal() > 0)
currentState.stopAudio();
currentState = gamestates.get(st.ordinal());
init();
}
+2
View File
@@ -26,4 +26,6 @@ public abstract class GameState {
public abstract void buttonPressed(ButtonEvent e);
public abstract void buttonReleased(ButtonEvent e);
public abstract void onJoystickMoved(JoystickEvent e);
public void stopAudio() { sh.close(); }
}