aboutsummaryrefslogtreecommitdiff
path: root/src/crepe
diff options
context:
space:
mode:
authorJAROWMR <jarorutjes07@gmail.com>2024-11-23 22:19:43 +0100
committerJAROWMR <jarorutjes07@gmail.com>2024-11-23 22:19:43 +0100
commit31e57c515519e53f25cf47c859dc19fef4fe533c (patch)
tree3f2408ea3954c6aaeedd040258bde5c7369a639d /src/crepe
parent08a3171b6bcc9a36ad89f04d2cdae406eb366a96 (diff)
parent1499363d85abedbdb571e33801b821f4dfabc638 (diff)
Merge branch 'master' of github.com:lonkaars/crepe into jaro/collision-system
Diffstat (limited to 'src/crepe')
-rw-r--r--src/crepe/api/Script.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/crepe/api/Script.h b/src/crepe/api/Script.h
index f0b9c73..a0870cb 100644
--- a/src/crepe/api/Script.h
+++ b/src/crepe/api/Script.h
@@ -22,6 +22,10 @@ class ComponentManager;
* \info Additional *events* (like Unity's OnDisable and OnEnable) should be implemented as
* member or lambda methods in derivative user script classes and registered in \c init().
*
+ * \warning Concrete scripts are allowed do create a custom constructor, but the utility
+ * functions should not be called inside the constructor as they rely on late references that
+ * are only available after the constructor returns.
+ *
* \see feature_script
*/
class Script {
@@ -63,8 +67,7 @@ protected:
*
* \returns Reference to component
*
- * \throws std::runtime_error if this game object does not have a component matching type \c
- * T
+ * \throws std::runtime_error if this game object does not have a component with type \c T
*/
template <typename T>
T & get_component() const;