generated from tipragot/rust
Adding a map creation plugin #57
|
@ -73,7 +73,7 @@ fn generate_map(
|
|||
}
|
||||
}
|
||||
CoCo_Sol marked this conversation as resolved
Outdated
|
||||
|
||||
CoCo_Sol marked this conversation as resolved
Outdated
tipragot
commented
I still think you should take an HexPosition, this will be simpler and will make this function simpler to use. I still think you should take an HexPosition, this will be simpler and will make this function simpler to use.
|
||||
/// Returns the type of the position with the given noise.
|
||||
/// Returns the type of the [HexPosition] with the given noise.
|
||||
fn get_type_tile(position: HexPosition<i32>, noise: &Perlin) -> Tile {
|
||||
CoCo_Sol marked this conversation as resolved
Outdated
tipragot
commented
get_tile_type get_tile_type
|
||||
let pixel_position = position.to_pixel_coordinates() * MAP_GENERATION_ZOOM;
|
||||
CoCo_Sol marked this conversation as resolved
Outdated
tipragot
commented
This is not a Zoom, it is a Scale This is not a Zoom, it is a Scale
|
||||
let value = noise.get([pixel_position.x as f64, pixel_position.y as f64]);
|
||||
|
|
Loading…
Reference in a new issue
This comment is wrong.