pub fn save_layer(&self, map_id: u16, layer_id: u16) -> Option<SerializableTilemap> {
		let mut tiles_map = HashMap::default();
		for (tile, parent, pos, tileset) in self.tiles.iter() {
			if parent.map_id != map_id || parent.layer_id != layer_id {
				continue;
			}

			save_tiles!(self, tile, parent, pos, tileset, tiles_map);
		}
		Some(SerializableTilemap { data: tiles_map })
	}
/// Save the given layer for the given map
Save the given layer for the given map
Save the given layer for the given map
pub fn save_layer(&self, map_id: u16, layer_id: u16) -> Option<SerializableTilemap> {
		let mut tiles_map = HashMap::default();
		for (tile, parent, pos, tileset) in self.tiles.iter() {
			if parent.map_id != map_id || parent.layer_id != layer_id {
				continue;
			}
			save_tiles!(self, tile, parent, pos, tileset, tiles_map);
		}
		Some(SerializableTilemap { data: tiles_map })
	}
pub fn save_layer ( & self , map_id : u16 , layer_id : u16 ) -> Option < SerializableTilemap > { let mut tiles_map = HashMap :: default ( ) ; for ( tile , parent , pos , tileset ) in self . tiles . iter ( ) { if parent . map_id != map_id || parent . layer_id != layer_id { continue ; } save_tiles ! ( self tile parent pos tileset tiles_map ) ; } Some ( SerializableTilemap { data : tiles_map } ) }
Save the given layer for the given map
Save the given layer for the given map
&self
map_id
u16
layer_id
u16
&self
map_id
u16
layer_id
u16