Struct ldtk2::EntityInstance [−][src]
pub struct EntityInstance {
pub grid: Vec<i64>,
pub identifier: String,
pub pivot: Vec<f64>,
pub tile: Option<EntityInstanceTile>,
pub def_uid: i64,
pub field_instances: Vec<FieldInstance>,
pub height: i64,
pub px: Vec<i64>,
pub width: i64,
}Fields
grid: Vec<i64>Grid-based coordinates ([x,y] format)
identifier: StringEntity definition identifier
pivot: Vec<f64>Pivot coordinates ([x,y] format, values are from 0 to 1) of the Entity
tile: Option<EntityInstanceTile>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: i64Reference of the Entity definition UID
field_instances: Vec<FieldInstance>An array of all custom fields and their values.
height: i64Entity height in pixels. For non-resizable entities, it will be the same as Entity definition.
px: Vec<i64>Pixel coordinates ([x,y] format) in current level coordinate space. Don’t forget
optional layer offsets, if they exist!
width: i64Entity width in pixels. For non-resizable entities, it will be the same as Entity definition.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for EntityInstance
impl Send for EntityInstance
impl Sync for EntityInstance
impl Unpin for EntityInstance
impl UnwindSafe for EntityInstance
Blanket Implementations
Mutably borrows from an owned value. Read more