Struct ldtk::EntityDef[][src]

pub struct EntityDef {
Show fields pub resizable_y: bool, pub line_opacity: f32, pub fill_opacity: f32, pub width: i32, pub limit_behavior: Value, pub resizable_x: bool, pub height: i32, pub pivot_y: f32, pub tile_render_mode: Value, pub uid: i32, pub tileset_id: Option<i32>, pub limit_scope: Value, pub color: String, pub render_mode: Value, pub tags: Vec<String>, pub show_name: bool, pub max_count: i32, pub pivot_x: f32, pub hollow: bool, pub keep_aspect_ratio: bool, pub field_defs: Vec<FieldDef>, pub tile_id: Option<i32>, pub identifier: String,
}

Fields

resizable_y: bool

If TRUE, the entity instances will be resizable vertically

line_opacity: f32
fill_opacity: f32
width: i32

Pixel width

limit_behavior: Value

Possible values: DiscardOldOnes, PreventAdding, MoveLastOne

resizable_x: bool

If TRUE, the entity instances will be resizable horizontally

height: i32

Pixel height

pivot_y: f32

Pivot Y coordinate (from 0 to 1.0)

tile_render_mode: Value

Possible values: Cover, FitInside, Repeat, Stretch

uid: i32

Unique Int identifier

tileset_id: Option<i32>

Tileset ID used for optional tile display

limit_scope: Value

If TRUE, the maxCount is a “per world” limit, if FALSE, it’s a “per level”. Possible values: PerLayer, PerLevel, PerWorld

color: String

Base entity color

render_mode: Value

Possible values: Rectangle, Ellipse, Tile, Cross

tags: Vec<String>

An array of strings that classifies this entity

show_name: bool

Display entity name in editor

max_count: i32

Max instances count

pivot_x: f32

Pivot X coordinate (from 0 to 1.0)

hollow: bool
keep_aspect_ratio: bool

Only applies to entities resizable on both X/Y. If TRUE, the entity instance width/height will keep the same aspect ratio as the definition.

field_defs: Vec<FieldDef>

Array of field definitions

tile_id: Option<i32>

Tile ID used for optional tile display

identifier: String

Unique String identifier

Trait Implementations

impl Clone for EntityDef[src]

impl Debug for EntityDef[src]

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

impl Serialize for EntityDef[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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.