Struct ldtk::EntityDef[][src]

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

Fields

resizable_y: bool

If TRUE, the entity instances will be resizable vertically

tile_id: Option<i32>

Tile ID used for optional tile display

render_mode: Value

Possible values: Rectangle, Ellipse, Tile, Cross

max_count: i32

Max instances count

width: i32

Pixel width

tileset_id: Option<i32>

Tileset ID used for optional tile display

pivot_y: f32

Pivot Y coordinate (from 0 to 1.0)

field_defs: Vec<FieldDef>

Array of field definitions

fill_opacity: f32
line_opacity: f32
limit_behavior: Value

Possible values: DiscardOldOnes, PreventAdding, MoveLastOne

tags: Vec<String>

An array of strings that classifies this entity

hollow: bool
tile_render_mode: Value

Possible values: Cover, FitInside, Repeat, Stretch

uid: i32

Unique Int identifier

identifier: String

Unique String identifier

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.

show_name: bool

Display entity name in editor

color: String

Base entity color

resizable_x: bool

If TRUE, the entity instances will be resizable horizontally

height: i32

Pixel height

pivot_x: f32

Pivot X coordinate (from 0 to 1.0)

limit_scope: Value

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

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.