Class MusicPlayerModel
java.lang.Object
fr.paris.saclay.sidescroller.controllers.components.musicPlayer.MusicPlayerModel
Model of MusicPlayer class.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a MusicPlayerModel instance, assigning songs to soundtrack's list. -
Method Summary
Modifier and TypeMethodDescriptionint
Gets current song.long
Gets current song timestamp.getImage()
Gets image.int
Gets song duration.Gets soundtrack.void
setCurrentSong
(int currentSong) Sets current song.void
setCurrentSongTimestamp
(long currentSongTimestamp) Sets current song timestamp.void
setSongDuration
(int songDuration) Sets song duration.
-
Constructor Details
-
MusicPlayerModel
public MusicPlayerModel()Creates a MusicPlayerModel instance, assigning songs to soundtrack's list.
-
-
Method Details
-
getSongDuration
public int getSongDuration()Gets song duration.- Returns:
- the song duration
-
setSongDuration
public void setSongDuration(int songDuration) Sets song duration.- Parameters:
songDuration
- the song duration
-
getCurrentSongTimestamp
public long getCurrentSongTimestamp()Gets current song timestamp.- Returns:
- the current song timestamp
-
setCurrentSongTimestamp
public void setCurrentSongTimestamp(long currentSongTimestamp) Sets current song timestamp.- Parameters:
currentSongTimestamp
- the current song timestamp
-
getSoundtrack
Gets soundtrack.- Returns:
- the soundtrack
-
getCurrentSong
public int getCurrentSong()Gets current song.- Returns:
- the current song
-
setCurrentSong
public void setCurrentSong(int currentSong) Sets current song.- Parameters:
currentSong
- the current song
-
getImage
Gets image.- Returns:
- the image
-