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).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Rider
impl<'de> Deserialize<'de> for Rider
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl WorldQuery for &Rider
impl WorldQuery for &Rider
Auto Trait Implementations§
impl Freeze for Rider
impl RefUnwindSafe for Rider
impl Send for Rider
impl Sync for Rider
impl Unpin for Rider
impl UnsafeUnpin for Rider
impl UnwindSafe for Rider
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more