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 066561ff6c - Show all commits

View file

@ -44,9 +44,8 @@ fn generate_map(
if let (Some(perlin), Some(spiral)) = (noise.as_ref(), map_iterator.as_mut()) { if let (Some(perlin), Some(spiral)) = (noise.as_ref(), map_iterator.as_mut()) {
if let Some(position) = spiral.next() { if let Some(position) = spiral.next() {
let pixel_position = position.to_pixel_coordinates((0.1, 0.1)); let pixel_position = position.to_pixel_coordinates((0.1, 0.1));
let type_tile = get_type_tile(pixel_position, perlin);
commands.spawn((type_tile, position)); commands.spawn((get_type_tile(pixel_position, perlin), position));
} else { } else {
*noise = None; *noise = None;
*map_iterator = None; *map_iterator = None;