diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-12-18 14:20:59 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-12-18 14:20:59 +0100 |
commit | cff284cedde9f0cc133ff2855557299ce1d8083c (patch) | |
tree | 7aafa1892cca039b5e59db8a748d91a8857262da /src/crepe/api/Script.h | |
parent | 8dfdb5a588614db80fa8f41ccf883c1766fe56ff (diff) |
add fixed/frame update functions to script
Diffstat (limited to 'src/crepe/api/Script.h')
-rw-r--r-- | src/crepe/api/Script.h | 17 |
1 files changed, 13 insertions, 4 deletions
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() |