Struct ldtk::AutoRuleDef[][src]

pub struct AutoRuleDef {
    pub flip_y: bool,
    pub active: bool,
    pub perlin_scale: f32,
    pub size: i32,
    pub tile_mode: Value,
    pub chance: f32,
    pub y_modulo: i32,
    pub checker: Value,
    pub pattern: Vec<i32>,
    pub tile_ids: Vec<i32>,
    pub x_modulo: i32,
    pub uid: i32,
    pub pivot_x: f32,
    pub perlin_active: bool,
    pub break_on_match: bool,
    pub flip_x: bool,
    pub perlin_octaves: f32,
    pub pivot_y: f32,
    pub perlin_seed: f32,
}

This complex section isn’t meant to be used by game devs at all, as these rules are completely resolved internally by the editor before any saving. You should just ignore this part.

Fields

flip_y: bool

If TRUE, allow rule to be matched by flipping its pattern vertically

active: bool

If FALSE, the rule effect isn’t applied, and no tiles are generated.

perlin_scale: f32
size: i32

Pattern width & height. Should only be 1,3,5 or 7.

tile_mode: Value

Defines how tileIds array is used Possible values: Single, Stamp

chance: f32

Chances for this rule to be applied (0 to 1)

y_modulo: i32

Y cell coord modulo

checker: Value

Checker mode Possible values: None, Horizontal, Vertical

pattern: Vec<i32>

Rule pattern (size x size)

tile_ids: Vec<i32>

Array of all the tile IDs. They are used randomly or as stamps, based on tileMode value.

x_modulo: i32

X cell coord modulo

uid: i32

Unique Int identifier

pivot_x: f32

X pivot of a tile stamp (0-1)

perlin_active: bool

If TRUE, enable Perlin filtering to only apply rule on specific random area

break_on_match: bool

When TRUE, the rule will prevent other rules to be applied in the same cell if it matches (TRUE by default).

flip_x: bool

If TRUE, allow rule to be matched by flipping its pattern horizontally

perlin_octaves: f32
pivot_y: f32

Y pivot of a tile stamp (0-1)

perlin_seed: f32

Trait Implementations

impl Clone for AutoRuleDef[src]

impl Debug for AutoRuleDef[src]

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

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