rmp::behavior::Timer
Calls you every N seconds. Shooting, blinking, a countdown.
Added to an object with add<rmp::behavior::Timer>(); the framework calls its _update with the object it is on.
Fields
| Field | Type | Default | What it is |
|---|---|---|---|
seconds | float | 1 | Between calls; 0 = it never fires |
repeat | bool | true | False = one call, and then it is spent |
on_timeout | Callback<Object &> | Called with the object the Timer is on. A frame longer than | |
ours | struct { … } | What it is keeping track of. Readable, because sometimes you want it; not yours to write. It is one PUBLIC member and not a private block because a struct with a private member is not an aggregate in C++20, and then |