#[repr(C)]pub struct LiveDataPacket {
pub GameCars: [PlayerInfo; 10],
pub NumCars: c_int,
pub GameBoosts: [BoostInfo; 50],
pub NumBoosts: c_int,
pub GameBall: BallInfo,
pub GameInfo: GameInfo,
pub GameTiles: [TileInfo; 200],
pub NumTiles: c_int,
pub Teams: [TeamInfo; 2],
pub NumTeams: c_int,
}
Fields§
§GameCars: [PlayerInfo; 10]
§NumCars: c_int
§GameBoosts: [BoostInfo; 50]
§NumBoosts: c_int
§GameBall: BallInfo
§GameInfo: GameInfo
§GameTiles: [TileInfo; 200]
§NumTiles: c_int
§Teams: [TeamInfo; 2]
§NumTeams: c_int
Implementations§
Source§impl LiveDataPacket
impl LiveDataPacket
Sourcepub fn cars(&self) -> impl Iterator<Item = &PlayerInfo>
pub fn cars(&self) -> impl Iterator<Item = &PlayerInfo>
Yields the PlayerInfo
for each player in the match.
Sourcepub fn match_score(&self) -> [i32; 2]
pub fn match_score(&self) -> [i32; 2]
Get the scores for the blue and orange teams, in that order.
RLBot doesn’t seem to return this info(?) so instead we compute it manually (and inaccurately) by adding up the goals for each individual player.
Trait Implementations§
Source§impl Clone for LiveDataPacket
impl Clone for LiveDataPacket
Source§fn clone(&self) -> LiveDataPacket
fn clone(&self) -> LiveDataPacket
Returns a copy 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 moreSource§impl Default for LiveDataPacket
impl Default for LiveDataPacket
impl Copy for LiveDataPacket
Auto Trait Implementations§
impl Freeze for LiveDataPacket
impl RefUnwindSafe for LiveDataPacket
impl Send for LiveDataPacket
impl Sync for LiveDataPacket
impl Unpin for LiveDataPacket
impl UnwindSafe for LiveDataPacket
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.