Struct macroquad_tiled::Map[][src]

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

impl Map[src]

pub fn spr(&self, tileset: &str, sprite: u32, dest: Rect)[src]

pub fn spr_ex(&self, tileset: &str, source: Rect, dest: Rect)[src]

pub fn contains_layer(&self, layer: &str) -> bool[src]

pub fn draw_tiles(
    &self,
    layer: &str,
    dest: Rect,
    source: impl Into<Option<Rect>>
)
[src]

pub fn tiles(
    &self,
    layer: &str,
    rect: impl Into<Option<Rect>>
) -> TilesIterator<'_>

Notable traits for TilesIterator<'a>

impl<'a> Iterator for TilesIterator<'a> type Item = (u32, u32, &'a Option<Tile>);
[src]

pub fn get_tile(&self, layer: &str, x: u32, y: u32) -> &Option<Tile>[src]

Trait Implementations

impl Debug for Map[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.