diff options
Diffstat (limited to 'src/crepe/api')
-rw-r--r-- | src/crepe/api/Script.cpp | 1 | ||||
-rw-r--r-- | src/crepe/api/Script.h | 17 |
2 files changed, 13 insertions, 5 deletions
diff --git a/src/crepe/api/Script.cpp b/src/crepe/api/Script.cpp index 6de6830..b147252 100644 --- a/src/crepe/api/Script.cpp +++ b/src/crepe/api/Script.cpp @@ -61,4 +61,3 @@ bool Script::get_key_state(Keycode key) const noexcept { return false; } } - diff --git a/src/crepe/api/Script.h b/src/crepe/api/Script.h index 2422cdc..5f68928 100644 --- a/src/crepe/api/Script.h +++ b/src/crepe/api/Script.h @@ -48,14 +48,23 @@ protected: */ virtual void init() {} /** - * \brief Script update function (empty by default) + * \brief Script fixed update function (empty by default) * * \param delta_time Time since last fixed update * - * This function is called during the ScriptSystem::update() routine if the \c BehaviorScript - * component holding this script instance is active. + * \note This function is called during the ScriptSystem::update() routine if the \c + * BehaviorScript component holding this script instance is active. */ - virtual void update(duration_t delta_time) {} + virtual void fixed_update(duration_t delta_time) {} + /** + * \brief Script frame update function (empty by default) + * + * \param delta_time Time since last frame update + * + * \note This function is called during the ScriptSystem::update() routine if the \c + * BehaviorScript component holding this script instance is active. + */ + virtual void frame_update(duration_t delta_time) {} //! \} //! ScriptSystem calls \c init() and \c update() |