Adding a map creation plugin #57

Merged
CoCo_Sol merged 39 commits from map-generation into main 2024-02-21 20:10:03 +00:00
Showing only changes of commit 9e9eec3914 - Show all commits

View file

@ -85,9 +85,9 @@ fn get_type(position: Vec2, noise: &Perlin) -> Tile {
fn delete_map(
mut commands: Commands,
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() {
commands.entity(entity).despawn_recursive();
}