pub struct EntityInstance {
pub field_instances: Vec<FieldInstance>,
pub width: i32,
pub __tile: Option<Value>,
pub __identifier: String,
pub px: Vec<i32>,
pub __grid: Vec<i32>,
pub height: i32,
pub __pivot: Vec<f32>,
pub def_uid: i32,
}
Expand description
Fields§
§field_instances: Vec<FieldInstance>
An array of all custom fields and their values.
width: i32
Entity width in pixels. For non-resizable entities, it will be the same as Entity definition.
__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).
__identifier: String
Entity definition identifier
px: Vec<i32>
Pixel coordinates ([x,y]
format) in current level coordinate space. Don’t forget optional layer offsets, if they exist!
__grid: Vec<i32>
Grid-based coordinates ([x,y]
format)
height: i32
Entity height in pixels. For non-resizable entities, it will be the same as Entity definition.
__pivot: Vec<f32>
Pivot coordinates ([x,y]
format, values are from 0 to 1) of the Entity
def_uid: i32
Reference of the Entity definition UID
Trait Implementations§
Source§impl Clone for EntityInstance
impl Clone for EntityInstance
Source§fn clone(&self) -> EntityInstance
fn clone(&self) -> EntityInstance
Returns a duplicate 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 Debug for EntityInstance
impl Debug for EntityInstance
Source§impl<'de> Deserialize<'de> for EntityInstance
impl<'de> Deserialize<'de> for EntityInstance
Source§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 Freeze for EntityInstance
impl RefUnwindSafe for EntityInstance
impl Send for EntityInstance
impl Sync for EntityInstance
impl Unpin for EntityInstance
impl UnwindSafe for EntityInstance
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