pub struct StatsSample {Show 21 fields
pub frame_number: usize,
pub time: f32,
pub dt: f32,
pub seconds_remaining: Option<i32>,
pub game_state: Option<i32>,
pub ball_has_been_hit: Option<bool>,
pub kickoff_countdown_time: Option<i32>,
pub team_zero_score: Option<i32>,
pub team_one_score: Option<i32>,
pub possession_team_is_team_0: Option<bool>,
pub scored_on_team_is_team_0: Option<bool>,
pub current_in_game_team_player_counts: Option<[usize; 2]>,
pub ball: Option<BallSample>,
pub players: Vec<PlayerSample>,
pub active_demos: Vec<DemoEventSample>,
pub demo_events: Vec<DemolishInfo>,
pub boost_pad_events: Vec<BoostPadEvent>,
pub touch_events: Vec<TouchEvent>,
pub dodge_refreshed_events: Vec<DodgeRefreshedEvent>,
pub player_stat_events: Vec<PlayerStatEvent>,
pub goal_events: Vec<GoalEvent>,
}Fields§
§frame_number: usize§time: f32§dt: f32§seconds_remaining: Option<i32>§game_state: Option<i32>§ball_has_been_hit: Option<bool>§kickoff_countdown_time: Option<i32>§team_zero_score: Option<i32>§team_one_score: Option<i32>§possession_team_is_team_0: Option<bool>§scored_on_team_is_team_0: Option<bool>§current_in_game_team_player_counts: Option<[usize; 2]>§ball: Option<BallSample>§players: Vec<PlayerSample>§active_demos: Vec<DemoEventSample>§demo_events: Vec<DemolishInfo>§boost_pad_events: Vec<BoostPadEvent>§touch_events: Vec<TouchEvent>§dodge_refreshed_events: Vec<DodgeRefreshedEvent>§player_stat_events: Vec<PlayerStatEvent>§goal_events: Vec<GoalEvent>Implementations§
Source§impl StatsSample
impl StatsSample
Sourcepub fn is_live_play(&self) -> bool
pub fn is_live_play(&self) -> bool
Returns whether time-based stats should treat this sample as live play.
We exclude frozen kickoff countdown frames and post-goal replay frames, but keep the movable pre-touch kickoff approach live.
Use LivePlayTracker when you need to exclude the full post-goal
reset segment that can continue after the goal frame itself.
pub fn current_in_game_team_player_count(&self, is_team_0: bool) -> usize
Trait Implementations§
Source§impl Clone for StatsSample
impl Clone for StatsSample
Source§fn clone(&self) -> StatsSample
fn clone(&self) -> StatsSample
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for StatsSample
impl RefUnwindSafe for StatsSample
impl Send for StatsSample
impl Sync for StatsSample
impl Unpin for StatsSample
impl UnsafeUnpin for StatsSample
impl UnwindSafe for StatsSample
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