pub fn build_layer(
        &mut self,
        commands: &mut Commands,
        mut layer_builder: LayerBuilder<impl TileBundleTrait>,
        material_handle: Handle<Image>,
    ) -> Entity {
        let layer_bundle = layer_builder.build(commands, &mut self.meshes, material_handle);
        let mut layer = layer_bundle.layer;
        let mut transform = layer_bundle.transform;
        layer.settings.layer_id = layer.settings.layer_id;
        transform.translation.z = layer.settings.layer_id as f32;
        commands
            .entity(layer_builder.layer_entity)
            .insert_bundle(LayerBundle {
                layer,
                transform,
                ..layer_bundle
            });
        layer_builder.layer_entity
    }
/// Builds the tile map layer and returns the layer's entity.
Builds the tile map layer and returns the layer's entity.
Builds the tile map layer and returns the layer ' s entity .
pub fn build_layer(
        &mut self,
        commands: &mut Commands,
        mut layer_builder: LayerBuilder<impl TileBundleTrait>,
        material_handle: Handle<Image>,
    ) -> Entity {
        let layer_bundle = layer_builder.build(commands, &mut self.meshes, material_handle);
        let mut layer = layer_bundle.layer;
        let mut transform = layer_bundle.transform;
        layer.settings.layer_id = layer.settings.layer_id;
        transform.translation.z = layer.settings.layer_id as f32;
        commands
            .entity(layer_builder.layer_entity)
            .insert_bundle(LayerBundle {
                layer,
                transform,
                ..layer_bundle
            });
        layer_builder.layer_entity
    }
pub fn build_layer ( & mut self , commands : & mut Commands , mut layer_builder : LayerBuilder < impl TileBundleTrait > , material_handle : Handle < Image > , ) -> Entity { let layer_bundle = layer_builder . build ( commands , & mut self . meshes , material_handle ) ; let mut layer = layer_bundle . layer ; let mut transform = layer_bundle . transform ; layer . settings . layer_id = layer . settings . layer_id ; transform . translation . z = layer . settings . layer_id as f32 ; commands . entity ( layer_builder . layer_entity ) . insert_bundle ( LayerBundle { layer , transform , .. layer_bundle } ) ; layer_builder . layer_entity }
Builds the tile map layer and returns the layer's entity.
Builds the tile map layer and returns the layer ' s entity .
&mut self
commands
&mut Commands
layer_builder
LayerBuilder<impl TileBundleTrait>
material_handle
Handle<Image>
&mut self
commands
&mut Commands
layer_builder
LayerBuilder<impl TileBundleTrait>
material_handle
Handle<Image>