diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2025-01-11 22:01:53 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2025-01-11 22:01:53 +0100 |
commit | f06be6004ec8b47e3b4b1ba4fda068b365923683 (patch) | |
tree | 26376513f8a52386e6127af324aa65177b620620 /src/doc/feature/script.dox | |
parent | a6803980f1e74ecf1abb007b7c77f00d2cd92c43 (diff) |
update doxygen documentation w/ updated APIloek/doxygen
Diffstat (limited to 'src/doc/feature/script.dox')
-rw-r--r-- | src/doc/feature/script.dox | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/doc/feature/script.dox b/src/doc/feature/script.dox index e3b5508..162b0f5 100644 --- a/src/doc/feature/script.dox +++ b/src/doc/feature/script.dox @@ -21,10 +21,10 @@ BehaviorScript \ref Component "component". \"\ref feature_gameobject\" first. First, define a class (anywhere) that inherits from Script. The Script class -acts as an interface, and has two functions (\ref Script::init "\c init()" and -\ref Script::update "\c update()"), which *may* be implemented (they are empty -by default). From now on, this derivative class will be referred to as a -*concrete script*. +acts as an interface, and has three functions (\ref Script::init "\c init()", +\ref Script::fixed_update "\c fixed_update()" and \ref Script::frame_update +"\c frame_update()"), which *may* be implemented (they are empty by default). +From now on, this derivative class will be referred to as a *concrete script*. ```cpp #include <crepe/api/Script.h> @@ -34,9 +34,13 @@ class MyScript : public crepe::Script { void init() { // called once } - void update() { + + void fixed_update(crepe::duration_t delta_time) { // called on fixed update } + void frame_update(crepe::duration_t delta_time) { + // called for every rendered frame + } }; ``` |