diff options
Diffstat (limited to 'src/audio.hpp')
-rw-r--r-- | src/audio.hpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/audio.hpp b/src/audio.hpp index 4d617c7..97fff99 100644 --- a/src/audio.hpp +++ b/src/audio.hpp @@ -21,10 +21,12 @@ #define SYSTEM_AUDIO_HPP_ #include <AL/alut.h> - #include <entityx/entityx.h> -class AudioSystem : public entityx::System<AudioSystem> +#include <components/Audio.hpp> + +class AudioSystem : public entityx::System<AudioSystem>, + public entityx::Receiver<AudioSystem> { private: std::unique_ptr<ALCdevice, void (*)(ALCdevice *)> device; @@ -46,6 +48,9 @@ public: void update(entityx::EntityManager& entities, entityx::EventManager& events, entityx::TimeDelta dt) final; + + void receive(const entityx::ComponentAddedEvent<Audio>& cae); + void receive(const entityx::ComponentRemovedEvent<Audio>& cae); }; #endif // SYSTEM_AUDIO_HPP_ |