Struct ogmo3::level::Entity [−][src]
pub struct Entity {}Show 14 fields
pub name: String, pub id: i32, pub export_id: String, pub x: f32, pub y: f32, pub width: Option<f32>, pub height: Option<f32>, pub origin_x: Option<f32>, pub origin_y: Option<f32>, pub rotation: Option<f32>, pub flipped_x: Option<bool>, pub flipped_y: Option<bool>, pub nodes: Option<Vec<Vec2<f32>>>, pub values: Option<HashMap<String, Value>>,
Expand description
An entity instance.
Fields
name: String
The entity’s name.
id: i32
The entity’s ID.
export_id: String
The unique export ID of the entity.
x: f32
The X position of the entity.
y: f32
The Y position of the entity.
width: Option<f32>
The width of the entity. Will only be present if the entity template was defined as resizable.
height: Option<f32>
The width of the entity. Will only be present if the entity template was defined as resizable.
origin_x: Option<f32>
The X origin of the entity. Will only be present if the entity template defined an origin.
origin_y: Option<f32>
The Y origin of the entity. Will only be present if the entity template defined an origin.
rotation: Option<f32>
The rotation of the entity. Will only be present if the entity template was defined as rotatable.
flipped_x: Option<bool>
Whether the entity is flipped on the X axis. Will only be present if the entity template was defined as X-flippable.
flipped_y: Option<bool>
Whether the entity is flipped on the Y axis. Will only be present if the entity template was defined as Y-flippable.
nodes: Option<Vec<Vec2<f32>>>
The entity’s nodes. Will only be present if the entity template was defined as having nodes.
values: Option<HashMap<String, Value>>
The entity’s custom values. Will only be present if the entity template was defined as having custom values.
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 Entity
impl UnwindSafe for Entity
Blanket Implementations
Mutably borrows from an owned value. Read more