6#include "Util/AssetStore.hpp"
26 explicit BGM(
const std::string &path);
89 void FadeIn(
int tick,
int loop = -1);
114 std::shared_ptr<Mix_Music> m_BGM;
A class template for managing assets.
Definition: AssetStore.hpp:20
Class for handling background music.
Definition: BGM.hpp:17
void SetVolume(int volume)
Sets the volume of the background music.
int GetVolume() const
Retrieves the current volume of the background music.
void LoadMedia(const std::string &path)
Loads the background music from the specified file path.
void FadeIn(int tick, int loop=-1)
Fades in the background music gradually.
void Pause()
Pauses the currently playing background music.
void VolumeDown(int step=1)
Decreases the volume of the background music by one.
void FadeOut(int tick)
Fades out the background music gradually.
void Resume()
Resumes the paused background music.
BGM & operator=(const BGM &)=delete
Deleted copy assignment operator to prevent copying of BGM objects.
BGM(const BGM &)=delete
Deleted copy constructor to prevent copying of BGM objects.
BGM(const std::string &path)
Constructor that initializes the BGM object and loads the music from the specified file path.
void Play(int loop=-1)
Plays the background music.
void VolumeUp(int step=1)
Increases the volume of the background music by one.
Useful tools for development.
Definition: Animation.hpp:12