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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.