From d258fcc8efdb6a968a220c4590a204292a16ad42 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Thu, 14 Nov 2024 20:27:05 +0100 Subject: added thoughts --- src/crepe/api/AudioSource.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/crepe/api') diff --git a/src/crepe/api/AudioSource.h b/src/crepe/api/AudioSource.h index 8a78927..1264790 100644 --- a/src/crepe/api/AudioSource.h +++ b/src/crepe/api/AudioSource.h @@ -7,10 +7,19 @@ namespace crepe { +class AudioSystem; + //! Audio source component class AudioSource : public Component { -public: + //! AudioSource components are handled by AudioSystem + friend class AudioSystem; + +protected: AudioSource(game_object_id_t id, const Asset & source); + //! Only ComponentManager can create components + friend class ComponentManager; +public: + // But std::unique_ptr needs to be able to destoy this component again virtual ~AudioSource() = default; public: -- cgit v1.2.3