generated from tipragot/rust
Adding a map creation plugin #57
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue