pub struct MovementCalculator { /* private fields */ }Expand description
Tracks per-player movement classification and stats.
Implementations§
Source§impl MovementCalculator
impl MovementCalculator
pub fn new() -> Self
pub fn events(&self) -> &[MovementEvent]
pub fn new_events(&self) -> &[MovementEvent]
Sourcepub fn pending_events(&self) -> Vec<MovementEvent>
pub fn pending_events(&self) -> Vec<MovementEvent>
The in-progress (not yet committed) coalescing events, one per active
player, in deterministic order. These keep mutating frame-to-frame until
the player’s classification changes, so consumers that accumulate
incrementally must overlay these on top of the committed events each
frame rather than folding them in permanently.
pub fn projected_events(&self) -> Vec<MovementEvent>
pub fn flush_pending_events(&mut self)
pub fn update( &mut self, frame: &FrameInfo, players: &PlayerFrameState, vertical_state: &PlayerVerticalState, live_play_state: &LivePlayState, ) -> SubtrActorResult<()>
Trait Implementations§
Source§impl Clone for MovementCalculator
impl Clone for MovementCalculator
Source§impl Debug for MovementCalculator
impl Debug for MovementCalculator
Auto Trait Implementations§
impl Freeze for MovementCalculator
impl RefUnwindSafe for MovementCalculator
impl Send for MovementCalculator
impl Sync for MovementCalculator
impl Unpin for MovementCalculator
impl UnsafeUnpin for MovementCalculator
impl UnwindSafe for MovementCalculator
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