# rmp::behavior::Lifespan

> Discarded after N seconds.

Source: https://omardev29.github.io/rmp-docs/reference/behaviors/Lifespan.html

behavior `#include <rmp/behavior.h>` [include/rmp/behavior.h:458](https://github.com/omardev29/raylib_multiplatform/blob/982bf2a1e307c49776bff84211260703b8de6895/include/rmp/behavior.h#L458-L471)

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 `{ .speed = 320 }` stops compiling — which is the whole design. The name is the fence. |
