aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/system/ScriptSystem.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/system/ScriptSystem.h')
-rw-r--r--src/crepe/system/ScriptSystem.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/crepe/system/ScriptSystem.h b/src/crepe/system/ScriptSystem.h
index 612c2ae..ca4534a 100644
--- a/src/crepe/system/ScriptSystem.h
+++ b/src/crepe/system/ScriptSystem.h
@@ -2,6 +2,8 @@
#include "System.h"
+#include "../manager/LoopTimerManager.h"
+
namespace crepe {
class Script;
@@ -16,13 +18,25 @@ class ScriptSystem : public System {
public:
using System::System;
/**
- * \brief Call Script::update() on all active \c BehaviorScript instances
+ * \brief Call Script::fixed_update() on all active \c BehaviorScript instances
*
* This routine updates all scripts sequentially using the Script::update()
* method. It also calls Script::init() if this has not been done before on
* the \c BehaviorScript instance.
*/
void fixed_update() override;
+
+ /**
+ * \brief Call Script::frame_update() on all active \c BehaviorScript instances
+ *
+ * This routine updates all scripts sequentially using the Script::update()
+ * method. It also calls Script::init() if this has not been done before on
+ * the \c BehaviorScript instance.
+ */
+ void frame_update() override;
+
+private:
+ void update(void (Script::* update_function)(duration_t), const duration_t & delta_time);
};
} // namespace crepe