pub struct TileMap<T: Tile> {
pub map: Matrix<Option<T>>,
pub buffer: Matrix<Color>,
/* private fields */
}Expand description
Where each tile is placed
Fields§
§map: Matrix<Option<T>>matrix storing the tiles in the map
buffer: Matrix<Color>color rendition of map
Implementations§
Source§impl<T: Tile> TileMap<T>
impl<T: Tile> TileMap<T>
pub fn new( dimensions: Dimensions, wrapping: bool, tile_dimensions: Dimensions, ) -> Self
Sourcepub fn update_buffer(&mut self)
pub fn update_buffer(&mut self)
updates tilemap buffer. must be done at least once to have tilemap display
Auto Trait Implementations§
impl<T> Freeze for TileMap<T>
impl<T> RefUnwindSafe for TileMap<T>where
T: RefUnwindSafe,
impl<T> Send for TileMap<T>
impl<T> Sync for TileMap<T>
impl<T> Unpin for TileMap<T>where
T: Unpin,
impl<T> UnwindSafe for TileMap<T>where
T: UnwindSafe,
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