aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/AudioSource.cpp
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-10 13:40:42 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-10 13:40:42 +0100
commitd80c98ee03e59e0c38e025a7fe83ab4c39115fb8 (patch)
treec31c861b82d384e64071b4e7f64dfafe99b888c0 /src/crepe/api/AudioSource.cpp
parentb2c72ee8ce282bb13b0fbeb2ddb01fdfd6ad1280 (diff)
parent7a8657dfe019104aced61a5b63e63f61ad919f7a (diff)
font progress
Diffstat (limited to 'src/crepe/api/AudioSource.cpp')
-rw-r--r--src/crepe/api/AudioSource.cpp15
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; }