[][src]Struct rlbot::ffi::LiveDataPacket

#[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_intGameBoosts: [BoostInfo; 50]NumBoosts: c_intGameBall: BallInfoGameInfo: GameInfoGameTiles: [TileInfo; 200]NumTiles: c_intTeams: [TeamInfo; 2]NumTeams: c_int

Methods

impl LiveDataPacket[src]

pub fn cars(&self) -> impl Iterator<Item = &PlayerInfo>[src]

Yields the PlayerInfo for each player in the match.

pub fn match_score(&self) -> [i32; 2][src]

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

impl Copy for LiveDataPacket[src]

impl Clone for LiveDataPacket[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Default for LiveDataPacket[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>,