12 friend class ::SoundManager;
21 void Serialize(Json::Value& node,
bool load)
override;
27 void SetPath(
const std::string& path);
33 const std::string&
GetPath()
const;
59 std::string path =
"";
61 bool shouldPlay =
false;
62 bool shouldPause =
false;
63 bool shouldStop =
false;
65 bool soundInitialized =
false;
Component describing a sound source.
Definition: SoundSource.hpp:11
const std::string & GetPath() const
Get the path to the sound file to play.
Definition: SoundSource.cpp:35
float gain
Gain.
Definition: SoundSource.hpp:48
void SetPath(const std::string &path)
Set the path to the sound file to play.
Definition: SoundSource.cpp:30
void Serialize(Json::Value &node, bool load) override
Save or load component values to/from JSON.
Definition: SoundSource.cpp:19
void Play()
Play the sound.
Definition: SoundSource.cpp:39
SoundSource()
Create new sound source.
Definition: SoundSource.cpp:11
~SoundSource()
Destructor.
Definition: SoundSource.cpp:15
void Stop()
Stop the sound.
Definition: SoundSource.cpp:47
void Pause()
Pause the sound.
Definition: SoundSource.cpp:43
float pitch
Pitch.
Definition: SoundSource.hpp:45
bool loop
Whether the sound should loop.
Definition: SoundSource.hpp:51
Component which all components inherit.
Definition: SuperComponent.hpp:9
Handles sound.
Definition: SoundManager.hpp:12
Definition: BoxShapeEditor.hpp:5