Struct ldtk::EntityInstance[][src]

pub struct EntityInstance {
    pub __identifier: String,
    pub __tile: Option<Value>,
    pub def_uid: i32,
    pub px: Vec<i32>,
    pub width: i32,
    pub height: i32,
    pub __grid: Vec<i32>,
    pub field_instances: Vec<FieldInstance>,
    pub __pivot: Vec<f32>,
}

Fields

__identifier: String

Entity definition identifier

__tile: Option<Value>

Optional Tile used to display this entity (it could either be the default Entity tile, or some tile provided by a field value, like an Enum).

def_uid: i32

Reference of the Entity definition UID

px: Vec<i32>

Pixel coordinates ([x,y] format) in current level coordinate space. Don’t forget optional layer offsets, if they exist!

width: i32

Entity width in pixels. For non-resizable entities, it will be the same as Entity definition.

height: i32

Entity height in pixels. For non-resizable entities, it will be the same as Entity definition.

__grid: Vec<i32>

Grid-based coordinates ([x,y] format)

field_instances: Vec<FieldInstance>

An array of all custom fields and their values.

__pivot: Vec<f32>

Pivot coordinates ([x,y] format, values are from 0 to 1) of the Entity

Trait Implementations

impl Clone for EntityInstance[src]

impl Debug for EntityInstance[src]

impl<'de> Deserialize<'de> for EntityInstance[src]

impl Serialize for EntityInstance[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.