Skip to main content

GameObject

Struct GameObject 

Source
pub struct GameObject {
Show 22 fields pub id: i32, pub tile: i32, pub x: i32, pub y: i32, pub sx: i32, pub sy: i32, pub frame: i32, pub rotation: i32, pub fid: i32, pub flags: i32, pub elevation: i32, pub pid: i32, pub cid: i32, pub light_distance: i32, pub light_intensity: i32, pub outline: i32, pub sid: i32, pub script_index: i32, pub inventory_length: i32, pub inventory_capacity: i32, pub object_data: ObjectData, pub inventory: Vec<InventoryItem>,
}

Fields§

§id: i32§tile: i32§x: i32§y: i32§sx: i32§sy: i32§frame: i32§rotation: i32§fid: i32§flags: i32§elevation: i32§pid: i32§cid: i32§light_distance: i32§light_intensity: i32§outline: i32§sid: i32§script_index: i32§inventory_length: i32§inventory_capacity: i32§object_data: ObjectData§inventory: Vec<InventoryItem>

Implementations§

Source§

impl GameObject

Source

pub fn parse<R: Read + Seek>(r: &mut BigEndianReader<R>) -> Result<Self>

Source

pub fn emit_to_vec(&self, out: &mut Vec<u8>) -> Result<()>

Source

pub fn emit_bytes(&self) -> Result<Vec<u8>>

Trait Implementations§

Source§

impl Debug for GameObject

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.