pub struct LdtkLayer {
pub level: usize,
/* private fields */
}
Fields§
§level: usize
Implementations§
Source§impl LdtkLayer
impl LdtkLayer
pub fn new(index: usize, layer: LayerInstance) -> Self
pub fn name(&self) -> &String
pub fn indexer(&self) -> Indexer
pub fn has_tiles(&self) -> bool
pub fn for_each_tile(&self, cb: impl FnMut(i64, i64, TileRef<'_>))
pub fn get_z_delta(&self) -> f32
pub fn get_tile(&self, pos: impl Into<SpatialIndex>) -> Option<TileRef<'_>>
pub fn get_tile_at( &self, a: impl AsPrimitive<i64>, b: impl AsPrimitive<i64>, ) -> Option<TileRef<'_>>
Sourcepub fn infer_tileset_name(&self) -> Option<String>
pub fn infer_tileset_name(&self) -> Option<String>
Returns the inferred name of the tileset used for this layer. This is assumed to be the name of the tileset file, without the preceding path segments or the file extension. Case remains unchanged
pub fn layer_ref(&self) -> &LayerInstance
pub fn layer_ref_mut(&mut self) -> &mut LayerInstance
pub fn has_tag(&self, tag: &str) -> bool
Trait Implementations§
Source§impl AsRef<LayerInstance> for LdtkLayer
impl AsRef<LayerInstance> for LdtkLayer
Source§fn as_ref(&self) -> &LayerInstance
fn as_ref(&self) -> &LayerInstance
Converts this type into a shared reference of the (usually inferred) input type.
Auto Trait Implementations§
impl Freeze for LdtkLayer
impl RefUnwindSafe for LdtkLayer
impl Send for LdtkLayer
impl Sync for LdtkLayer
impl Unpin for LdtkLayer
impl UnwindSafe for LdtkLayer
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
Mutably borrows from an owned value. Read more