Struct macroquad_tiled::Map
source · pub struct Map {
pub layers: HashMap<String, Layer>,
pub tilesets: HashMap<String, TileSet>,
pub raw_tiled_map: Map,
}
Fields§
§layers: HashMap<String, Layer>
§tilesets: HashMap<String, TileSet>
§raw_tiled_map: Map
Deserialized json as is
Implementations§
source§impl Map
impl Map
pub fn spr(&self, tileset: &str, sprite: u32, dest: Rect)
pub fn spr_ex(&self, tileset: &str, source: Rect, dest: Rect)
pub fn contains_layer(&self, layer: &str) -> bool
pub fn draw_tiles( &self, layer: &str, dest: Rect, source: impl Into<Option<Rect>> )
pub fn draw_imglayer(&self, layer: &str, dest: Rect, source: Option<Rect>)
pub fn tiles( &self, layer: &str, rect: impl Into<Option<Rect>> ) -> TilesIterator<'_> ⓘ
pub fn get_tile(&self, layer: &str, x: u32, y: u32) -> &Option<Tile>
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Map
impl Send for Map
impl Sync for Map
impl Unpin for Map
impl UnwindSafe for 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