|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectefficom.runningjoe.services.MusicManager
public class MusicManager
A service that manages the background music.
Only one music may be playing at a given time.
Nested Class Summary | |
---|---|
static class |
MusicManager.RunningJoeMusic
The available music files. |
Method Summary | |
---|---|
void |
dispose()
Disposes the music manager. |
static MusicManager |
getInstance()
|
void |
play(MusicManager.RunningJoeMusic music)
Plays the given music (starts the streaming). |
void |
setEnabled(boolean enabled)
Enables or disabled the music. |
void |
setVolume(float volume)
Sets the music volume which must be inside the range [0,1]. |
void |
stop()
Stops and disposes the current music being played, if any. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static final MusicManager getInstance()
public void play(MusicManager.RunningJoeMusic music)
If there is already a music being played it is stopped automatically.
public void stop()
public void setVolume(float volume)
public void setEnabled(boolean enabled)
public void dispose()
dispose
in interface com.badlogic.gdx.utils.Disposable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |