aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-11-14 20:27:05 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-11-14 20:27:05 +0100
commitd258fcc8efdb6a968a220c4590a204292a16ad42 (patch)
treebb37f3d00f42b15a38e07f8ae0ba7fe2641cf7e3 /src/crepe/api
parentadd8724446fdeae1aaec9b07544cf7a5475a9bfe (diff)
added thoughts
Diffstat (limited to 'src/crepe/api')
-rw-r--r--src/crepe/api/AudioSource.h11
1 files changed, 10 insertions, 1 deletions
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: