concinnity-core 0.19.2

Runtime vocabulary for the Concinnity engine: GPU layouts, ECS components, registry, CPU kernels
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
// src/components/lifetime.rs

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