Class MusicManager
java.lang.Object
com.toxicrain.rainengine.sound.music.MusicManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the currently playing track name.void
setNextTrack
(String trackName) Dynamically sets the next track to be played.void
setStartingSound
(String trackName) Sets the starting track that should play first.void
start()
Start playing musicvoid
stop()
-
Constructor Details
-
MusicManager
-
-
Method Details
-
start
public void start()Start playing music -
stop
public void stop() -
setNextTrack
Dynamically sets the next track to be played. Inserts it into the trackOrder directly after the current one.- Parameters:
trackName
- The name of the track (must exist in soundMap)
-
setStartingSound
Sets the starting track that should play first.- Parameters:
trackName
- The name of the track to start with (must exist in soundMap)
-
getCurrentTrackName
Get the currently playing track name.- Returns:
- The name of the track that is currently playing or null if no track is playing.
-