rmp::behavior::Lifespan
struct Lifespan
Discarded after N seconds. Particles, bullets.
Added to an object with add<rmp::behavior::Lifespan>(); the framework calls its _update with the object it is on.
Fields
| Field | Type | Default | What it is |
|---|---|---|---|
seconds | float | 1 | How long the object lasts before it is destroyed |
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 |