Struct tego::TileLayer [−][src]
pub struct TileLayer {
pub id: usize,
pub name: String,
pub size: ivec2,
pub tiles: Vec<Option<GID>>,
}Fields
id: usizename: Stringsize: ivec2tiles: Vec<Option<GID>>Implementations
pub fn tiles_in_renderorder<'a, 'b>(
&'b self,
map: &'a Map
) -> TileIterator<'a, 'b>ⓘNotable traits for TileIterator<'a, 'b>impl<'a, 'b> Iterator for TileIterator<'a, 'b> type Item = (ivec2, Option<GID>);
pub fn tiles_in_renderorder<'a, 'b>(
&'b self,
map: &'a Map
) -> TileIterator<'a, 'b>ⓘNotable traits for TileIterator<'a, 'b>impl<'a, 'b> Iterator for TileIterator<'a, 'b> type Item = (ivec2, Option<GID>);
Notable traits for TileIterator<'a, 'b>
impl<'a, 'b> Iterator for TileIterator<'a, 'b> type Item = (ivec2, Option<GID>);Iterate over the tiles inside of this layer in the order in which they would be rendered. See Map::renderorder. This iterator yields the GID and xy coordinates of the tiles in the layer, with a None GID for empty tiles.
Panics
At the moment, this function is only implemented for a renderorder of RightDown. Other render orders result in a panic.