Struct ldtk2::EntityDefinition[][src]

pub struct EntityDefinition {
    pub color: String,
    pub field_defs: Vec<FieldDefinition>,
    pub height: i64,
    pub identifier: String,
    pub limit_behavior: Option<LimitBehavior>,
    pub max_per_level: i64,
    pub pivot_x: f64,
    pub pivot_y: f64,
    pub render_mode: Option<RenderMode>,
    pub show_name: bool,
    pub tile_id: Option<i64>,
    pub tile_render_mode: Option<TileRenderMode>,
    pub tileset_id: Option<i64>,
    pub uid: i64,
    pub width: i64,
}

Fields

color: String

Base entity color

field_defs: Vec<FieldDefinition>

Array of field definitions

height: i64

Pixel height

identifier: String

Unique String identifier

limit_behavior: Option<LimitBehavior>

Possible values: DiscardOldOnes, PreventAdding, MoveLastOne

max_per_level: i64

Max instances per level

pivot_x: f64

Pivot X coordinate (from 0 to 1.0)

pivot_y: f64

Pivot Y coordinate (from 0 to 1.0)

render_mode: Option<RenderMode>

Possible values: Rectangle, Ellipse, Tile, Cross

show_name: bool

Display entity name in editor

tile_id: Option<i64>

Tile ID used for optional tile display

tile_render_mode: Option<TileRenderMode>

Possible values: Stretch, Crop

tileset_id: Option<i64>

Tileset ID used for optional tile display

uid: i64

Unique Int identifier

width: i64

Pixel width

Trait Implementations

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

impl Serialize for EntityDefinition[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, 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.