diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-12-10 19:22:14 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-12-10 19:22:14 +0100 |
commit | 1e5c6c5cf0d1be976e0e59099ddcfc62940ef1be (patch) | |
tree | 8878a7021fcaecdb5244e6940a442199f499347d /src/crepe/api/AudioSource.cpp | |
parent | 467ca584b359f6e504800222e16025d345fdff2a (diff) | |
parent | 7cbc577e94ed048f2a8146fab6972ae6ff290be7 (diff) |
merge master
Diffstat (limited to 'src/crepe/api/AudioSource.cpp')
-rw-r--r-- | src/crepe/api/AudioSource.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/crepe/api/AudioSource.cpp b/src/crepe/api/AudioSource.cpp new file mode 100644 index 0000000..7b05cb1 --- /dev/null +++ b/src/crepe/api/AudioSource.cpp @@ -0,0 +1,15 @@ +#include "AudioSource.h" + +using namespace crepe; +using namespace std; + +AudioSource::AudioSource(game_object_id_t id, const Asset & src) + : Component(id), + source(src) {} + +void AudioSource::play(bool looping) { + this->loop = looping; + this->oneshot_play = true; +} + +void AudioSource::stop() { this->oneshot_stop = true; } |