pub struct Rider { /* private fields */ }Expand description
Core component for any entity that rides elevators.
This is the minimum data the simulation needs. Games attach
additional components (VipTag, FreightData, PersonData, etc.)
for game-specific behavior. An entity with Rider but no
Route component can be boarded/exited manually by game code.
Implementations§
Source§impl Rider
impl Rider
Sourcepub const fn phase(&self) -> RiderPhase
pub const fn phase(&self) -> RiderPhase
Current rider lifecycle phase.
Sourcepub const fn current_stop(&self) -> Option<EntityId>
pub const fn current_stop(&self) -> Option<EntityId>
The stop entity this rider is currently at (while Waiting/Arrived/Abandoned/Resident).
Sourcepub const fn spawn_tick(&self) -> u64
pub const fn spawn_tick(&self) -> u64
Tick when this rider was spawned.
Sourcepub const fn board_tick(&self) -> Option<u64>
pub const fn board_tick(&self) -> Option<u64>
Tick when this rider boarded (for ride-time metrics).
Sourcepub const fn tag(&self) -> u64
pub const fn tag(&self) -> u64
Opaque consumer-attached tag. The engine doesn’t interpret this
value; consumers use it to correlate riders with external
identifiers (e.g. a game-side sim id, a player id, a freight
shipment id) without maintaining a parallel RiderId → u64 map.
Defaults to 0, which is reserved by convention for “untagged.”