java.lang.Object
fr.paris.saclay.sidescroller.controllers.components.musicPlayer.MusicPlayerModel

public class MusicPlayerModel extends Object
Model of MusicPlayer class.
  • 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

      public List<String> 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

      public Image getImage()
      Gets image.
      Returns:
      the image