generated from tipragot/rust
Add a renderer system with temp assets #60
|
@ -85,9 +85,9 @@ fn get_type(position: Vec2, noise: &Perlin) -> Tile {
|
||||||
fn delete_map(
|
fn delete_map(
|
||||||
mut commands: Commands,
|
mut commands: Commands,
|
||||||
query: Query<Entity, With<Tile>>,
|
query: Query<Entity, With<Tile>>,
|
||||||
mut event: EventReader<StartMapGeneration>,
|
mut start_generation_events: EventReader<StartMapGeneration>,
|
||||||
) {
|
) {
|
||||||
for _ in event.read() {
|
for _ in start_generation_events.read() {
|
||||||
for entity in query.iter() {
|
for entity in query.iter() {
|
||||||
commands.entity(entity).despawn_recursive();
|
commands.entity(entity).despawn_recursive();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue