pub struct Chunk<'map> { /* private fields */ }Expand description
Part of an InfiniteTileLayer.
Implementations§
Methods from Deref<Target = ChunkData>§
pub const WIDTH: u32 = 16u32
pub const HEIGHT: u32 = 16u32
pub const TILE_COUNT: usize = 256usize
Sourcepub fn get_tile_data(&self, x: i32, y: i32) -> Option<&LayerTileData>
pub fn get_tile_data(&self, x: i32, y: i32) -> Option<&LayerTileData>
Obtains the tile data present at the position given relative to the chunk’s top-left-most tile.
If the position given is invalid or the position is empty, this function will return None.
If you want to get a LayerTile instead, use Chunk::get_tile().
Trait Implementations§
impl<'map> Copy for Chunk<'map>
impl<'map> StructuralPartialEq for Chunk<'map>
Auto Trait Implementations§
impl<'map> Freeze for Chunk<'map>
impl<'map> RefUnwindSafe for Chunk<'map>
impl<'map> Send for Chunk<'map>
impl<'map> Sync for Chunk<'map>
impl<'map> Unpin for Chunk<'map>
impl<'map> UnwindSafe for Chunk<'map>
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