[−][src]Struct ldtk_rust::LayerInstance
Fields
c_hei: i64
Grid-based height
c_wid: i64
Grid-based width
grid_size: i64
Grid size
identifier: String
Layer definition identifier
opacity: f64
Layer opacity as Float [0-1]
px_total_offset_x: i64
Total layer X pixel offset, including both instance and definition offsets.
px_total_offset_y: i64
Total layer Y pixel offset, including both instance and definition offsets.
tileset_def_uid: Option<i64>
The definition UID of corresponding Tileset, if any.
tileset_rel_path: Option<String>
The relative path to corresponding Tileset, if any.
layer_instance_type: String
Layer type (possible values: IntGrid, Entities, Tiles or AutoLayer)
auto_layer_tiles: Vec<TileInstance>
An array containing all tiles generated by Auto-layer rules. The array is already sorted
in display order (ie. 1st tile is beneath 2nd, which is beneath 3rd etc.).
Note: if multiple tiles are stacked in the same cell as the result of different rules,
all tiles behind opaque ones will be discarded.
entity_instances: Vec<EntityInstance>
grid_tiles: Vec<TileInstance>
int_grid: Vec<IntGridValueInstance>
layer_def_uid: i64
Reference the Layer definition UID
level_id: i64
Reference to the UID of the level containing this layer instance
px_offset_x: i64
X offset in pixels to render this layer, usually 0 (IMPORTANT: this should be added to
the LayerDef
optional offset, see __pxTotalOffsetX
)
px_offset_y: i64
Y offset in pixels to render this layer, usually 0 (IMPORTANT: this should be added to
the LayerDef
optional offset, see __pxTotalOffsetY
)
seed: i64
Random seed used for Auto-Layers rendering
Trait Implementations
impl<'de> Deserialize<'de> for LayerInstance
[src]
pub fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for LayerInstance
[src]
Auto Trait Implementations
impl RefUnwindSafe for LayerInstance
[src]
impl Send for LayerInstance
[src]
impl Sync for LayerInstance
[src]
impl Unpin for LayerInstance
[src]
impl UnwindSafe for LayerInstance
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,