pub struct AutoLayerRuleDefinition {Show 29 fields
pub active: bool,
pub alpha: f64,
pub break_on_match: bool,
pub chance: f64,
pub checker: Checker,
pub flip_x: bool,
pub flip_y: bool,
pub out_of_bounds_value: Option<i64>,
pub pattern: Vec<i64>,
pub perlin_active: bool,
pub perlin_octaves: f64,
pub perlin_scale: f64,
pub perlin_seed: f64,
pub pivot_x: f64,
pub pivot_y: f64,
pub size: i64,
pub tile_ids: Vec<i64>,
pub tile_mode: TileMode,
pub tile_random_x_max: i64,
pub tile_random_x_min: i64,
pub tile_random_y_max: i64,
pub tile_random_y_min: i64,
pub tile_x_offset: i64,
pub tile_y_offset: i64,
pub uid: i64,
pub x_modulo: i64,
pub x_offset: i64,
pub y_modulo: i64,
pub y_offset: i64,
}Expand description
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§
§active: boolIf FALSE, the rule effect isn’t applied, and no tiles are generated.
alpha: f64§break_on_match: boolWhen TRUE, the rule will prevent other rules to be applied in the same cell if it matches (TRUE by default).
chance: f64Chances for this rule to be applied (0 to 1)
checker: CheckerChecker mode Possible values: None, Horizontal, Vertical
flip_x: boolIf TRUE, allow rule to be matched by flipping its pattern horizontally
flip_y: boolIf TRUE, allow rule to be matched by flipping its pattern vertically
out_of_bounds_value: Option<i64>Default IntGrid value when checking cells outside of level bounds
pattern: Vec<i64>Rule pattern (size x size)
perlin_active: boolIf TRUE, enable Perlin filtering to only apply rule on specific random area
perlin_octaves: f64§perlin_scale: f64§perlin_seed: f64§pivot_x: f64X pivot of a tile stamp (0-1)
pivot_y: f64Y pivot of a tile stamp (0-1)
size: i64Pattern width & height. Should only be 1,3,5 or 7.
tile_ids: Vec<i64>Array of all the tile IDs. They are used randomly or as stamps, based on tileMode value.
tile_mode: TileModeDefines how tileIds array is used Possible values: Single, Stamp
tile_random_x_max: i64Max random offset for X tile pos
tile_random_x_min: i64Min random offset for X tile pos
tile_random_y_max: i64Max random offset for Y tile pos
tile_random_y_min: i64Min random offset for Y tile pos
tile_x_offset: i64Tile X offset
tile_y_offset: i64Tile Y offset
uid: i64Unique Int identifier
x_modulo: i64X cell coord modulo
x_offset: i64X cell start offset
y_modulo: i64Y cell coord modulo
y_offset: i64Y cell start offset
Trait Implementations§
Source§impl Clone for AutoLayerRuleDefinition
impl Clone for AutoLayerRuleDefinition
Source§fn clone(&self) -> AutoLayerRuleDefinition
fn clone(&self) -> AutoLayerRuleDefinition
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AutoLayerRuleDefinition
impl Debug for AutoLayerRuleDefinition
Source§impl<'de> Deserialize<'de> for AutoLayerRuleDefinition
impl<'de> Deserialize<'de> for AutoLayerRuleDefinition
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for AutoLayerRuleDefinition
impl RefUnwindSafe for AutoLayerRuleDefinition
impl Send for AutoLayerRuleDefinition
impl Sync for AutoLayerRuleDefinition
impl Unpin for AutoLayerRuleDefinition
impl UnwindSafe for AutoLayerRuleDefinition
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more