aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/BehaviorScript.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/api/BehaviorScript.h')
-rw-r--r--src/crepe/api/BehaviorScript.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/crepe/api/BehaviorScript.h b/src/crepe/api/BehaviorScript.h
index c20842d..4160a72 100644
--- a/src/crepe/api/BehaviorScript.h
+++ b/src/crepe/api/BehaviorScript.h
@@ -10,6 +10,13 @@ class ScriptSystem;
class ComponentManager;
class Script;
+/**
+ * \brief Script component
+ *
+ * This class acts as a (component) wrapper around an instance of (a class
+ * derivatived from) \c Script. \c BehaviorScript is the only ECS component
+ * that stores member function implementations as data.
+ */
class BehaviorScript : public Component {
protected:
friend class crepe::ComponentManager;
@@ -24,6 +31,7 @@ public:
protected:
friend class crepe::ScriptSystem;
+ //! Script instance
std::unique_ptr<Script> script = nullptr;
};