blob: b0cf28cdb19f3d4170c66358e69b9f77241d73e9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#include <memory>
#include "AudioSource.h"
using namespace crepe;
using namespace std;
AudioSource::AudioSource(game_object_id_t id, unique_ptr<Asset> audio_clip) :
Component(id),
audio_clip(std::move(audio_clip))
{ }
void AudioSource::play(bool looping) {
this->loop = looping;
this->playing = true;
}
void AudioSource::stop() {
this->playing = false;
this->rewind = true;
}
|