concinnity_core/components/lifetime.rs
1// src/components/lifetime.rs
2
3/// Runtime-only countdown on an entity: seconds remaining before it is
4/// automatically removed. A spawn carries it onto short-lived instances
5/// (projectiles, debris, timed effects); the graphics step decrements it each
6/// frame and despawns the entity (and its descendants) when it reaches zero,
7/// reclaiming the GPU draw slots for reuse. World authors never declare this
8/// type directly; it is set at spawn time.
9#[derive(Debug, Default, Clone, Copy)]
10pub struct Lifetime {
11 /// Seconds left before the entity is despawned.
12 pub remaining: f32,
13}