pub struct LayerDefinition {Show 30 fields
pub layer_definition_type: String,
pub auto_rule_groups: Vec<AutoLayerRuleGroup>,
pub auto_source_layer_def_uid: Option<i64>,
pub auto_tileset_def_uid: Option<i64>,
pub can_select_when_inactive: bool,
pub display_opacity: f64,
pub doc: Option<String>,
pub excluded_tags: Vec<String>,
pub grid_size: i64,
pub guide_grid_hei: i64,
pub guide_grid_wid: i64,
pub hide_fields_when_inactive: bool,
pub hide_in_list: bool,
pub identifier: String,
pub inactive_opacity: f64,
pub int_grid_values: Vec<IntGridValueDefinition>,
pub int_grid_values_groups: Vec<IntGridValueGroupDefinition>,
pub parallax_factor_x: f64,
pub parallax_factor_y: f64,
pub parallax_scaling: bool,
pub px_offset_x: i64,
pub px_offset_y: i64,
pub render_in_world_view: bool,
pub required_tags: Vec<String>,
pub tile_pivot_x: f64,
pub tile_pivot_y: f64,
pub tileset_def_uid: Option<i64>,
pub purple_type: Type,
pub ui_color: Option<String>,
pub uid: i64,
}Fields§
§layer_definition_type: StringType of the layer (IntGrid, Entities, Tiles or AutoLayer)
auto_rule_groups: Vec<AutoLayerRuleGroup>Contains all the auto-layer rule definitions.
auto_source_layer_def_uid: Option<i64>§auto_tileset_def_uid: Option<i64>WARNING: this deprecated value is no longer exported since version 1.2.0 Replaced
by: tilesetDefUid
can_select_when_inactive: boolAllow editor selections when the layer is not currently active.
display_opacity: f64Opacity of the layer (0 to 1.0)
doc: Option<String>User defined documentation for this element to provide help/tips to level designers.
An array of tags to forbid some Entities in this layer
grid_size: i64Width and height of the grid in pixels
guide_grid_hei: i64Height of the optional “guide” grid in pixels
guide_grid_wid: i64Width of the optional “guide” grid in pixels
hide_fields_when_inactive: bool§hide_in_list: boolHide the layer from the list on the side of the editor view.
identifier: StringUser defined unique identifier
inactive_opacity: f64Alpha of this layer when it is not the active one.
int_grid_values: Vec<IntGridValueDefinition>An array that defines extra optional info for each IntGrid value.
WARNING: the
array order is not related to actual IntGrid values! As user can re-order IntGrid values
freely, you may value “2” before value “1” in this array.
int_grid_values_groups: Vec<IntGridValueGroupDefinition>Group informations for IntGrid values
parallax_factor_x: f64Parallax horizontal factor (from -1 to 1, defaults to 0) which affects the scrolling speed of this layer, creating a fake 3D (parallax) effect.
parallax_factor_y: f64Parallax vertical factor (from -1 to 1, defaults to 0) which affects the scrolling speed of this layer, creating a fake 3D (parallax) effect.
parallax_scaling: boolIf true (default), a layer with a parallax factor will also be scaled up/down accordingly.
px_offset_x: i64X offset of the layer, in pixels (IMPORTANT: this should be added to the LayerInstance
optional offset)
px_offset_y: i64Y offset of the layer, in pixels (IMPORTANT: this should be added to the LayerInstance
optional offset)
render_in_world_view: boolIf TRUE, the content of this layer will be used when rendering levels in a simplified way for the world view
An array of tags to filter Entities that can be added to this layer
tile_pivot_x: f64If the tiles are smaller or larger than the layer grid, the pivot value will be used to position the tile relatively its grid cell.
tile_pivot_y: f64If the tiles are smaller or larger than the layer grid, the pivot value will be used to position the tile relatively its grid cell.
tileset_def_uid: Option<i64>Reference to the default Tileset UID being used by this layer definition.
WARNING: some layer instances might use a different tileset. So most of the time,
you should probably use the __tilesetDefUid value found in layer instances.
Note:
since version 1.0.0, the old autoTilesetDefUid was removed and merged into this value.
purple_type: TypeType of the layer as Haxe Enum Possible values: IntGrid, Entities, Tiles,
AutoLayer
ui_color: Option<String>User defined color for the UI
uid: i64Unique Int identifier
Trait Implementations§
Source§impl Clone for LayerDefinition
impl Clone for LayerDefinition
Source§fn clone(&self) -> LayerDefinition
fn clone(&self) -> LayerDefinition
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LayerDefinition
impl Debug for LayerDefinition
Source§impl<'de> Deserialize<'de> for LayerDefinition
impl<'de> Deserialize<'de> for LayerDefinition
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 LayerDefinition
impl RefUnwindSafe for LayerDefinition
impl Send for LayerDefinition
impl Sync for LayerDefinition
impl Unpin for LayerDefinition
impl UnsafeUnpin for LayerDefinition
impl UnwindSafe for LayerDefinition
Blanket Implementations§
impl<T> Any for Twhere
T: Any,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> CloneAny for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Component for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
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