aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Script.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/api/Script.h')
-rw-r--r--src/crepe/api/Script.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/crepe/api/Script.h b/src/crepe/api/Script.h
index 839d937..0702e36 100644
--- a/src/crepe/api/Script.h
+++ b/src/crepe/api/Script.h
@@ -64,6 +64,13 @@ protected:
template <typename T>
RefVector<T> get_components() const;
+ /**
+ * \brief Gets game object id this script is attached to
+ *
+ * \returns game object id
+ */
+ game_object_id_t get_game_object_id() const {return this->game_object_id;};
+
protected:
// NOTE: Script must have a constructor without arguments so the game programmer doesn't need
// to manually add `using Script::Script` to their concrete script class.