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:
@@ -40,10 +40,7 @@ impl Plugin for AsteroidPlugin {
|
||||
RapierDebugRenderPlugin::default(),
|
||||
))
|
||||
.insert_resource(ClearColor(BACKGROUND_COLOR))
|
||||
.insert_resource(WorldSize {
|
||||
width: WINDOW_SIZE.x,
|
||||
height: WINDOW_SIZE.y,
|
||||
})
|
||||
.insert_resource(WorldSize::default())
|
||||
.insert_resource(Lives(3))
|
||||
.register_type::<Lives>()
|
||||
.insert_resource(Score(0))
|
||||
|
||||
Reference in New Issue
Block a user