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:
@@ -56,9 +56,9 @@ pub(crate) fn wrap_entities(
|
||||
mut query: Query<&mut Transform, With<Wrapping>>,
|
||||
world_size: Res<WorldSize>,
|
||||
) {
|
||||
let right = world_size.width / 2.0;
|
||||
let right = world_size.x / 2.0;
|
||||
let left = -right;
|
||||
let top = world_size.height / 2.0;
|
||||
let top = world_size.y / 2.0;
|
||||
let bottom = -top;
|
||||
|
||||
for mut pos in query.iter_mut() {
|
||||
|
||||
Reference in New Issue
Block a user