Rewrite WorldSize as a newtype around Vec2
All checks were successful
Basic checks / Basic build-and-test supertask (push) Successful in 7m7s
All checks were successful
Basic checks / Basic build-and-test supertask (push) Successful in 7m7s
Closes #16 Bevy provides Deref and DerefMut derives, so that's nice. I'm not sure it makes any sense to keep the field private since those derefs expose the Vec2 anyway. I added an `impl Default` anyway, though.
This commit is contained in:
@@ -55,7 +55,7 @@ pub fn tick_asteroid_manager(
|
||||
let spawn_angle = rng.random_range(0.0..(std::f32::consts::PI * 2.0));
|
||||
// Rho will be the radius of a circle bordering the viewport, multiplied by 1.2
|
||||
// TODO: Use view diagonal to get a minimally sized circle around the play area
|
||||
let spawn_distance = play_area.width.max(play_area.height) / 2.0;
|
||||
let spawn_distance = play_area.x.max(play_area.y) / 2.0;
|
||||
|
||||
// Convert polar to Cartesian, use as position
|
||||
let pos = Vec2::new(
|
||||
|
||||
Reference in New Issue
Block a user