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()) {
|
||||
CoCo_Sol marked this conversation as resolved
Outdated
|
||||
if let Some(position) = spiral.next() {
|
||||
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 {
|
||||
*noise = None;
|
||||
*map_iterator = None;
|
||||
|
|
Loading…
Reference in a new issue
Isize will not be great to use for networking because it's length depend on the system that runs the program.
Also you should use
type
to alias a specific type for the HexPosition used for the map.I use only one time the hex position, is it really better to create a new type ?
You will use it every time you want to make a Query on the HexPosition
ok, you've convinced me