Autoformat to make the checker happy
Some checks failed
Basic checks / Basic build-and-test supertask (push) Failing after 44s
Some checks failed
Basic checks / Basic build-and-test supertask (push) Failing after 44s
This commit is contained in:
18
src/lib.rs
18
src/lib.rs
@@ -9,10 +9,7 @@ pub struct AsteroidPlugin;
|
||||
|
||||
impl Plugin for AsteroidPlugin {
|
||||
fn build(&self, app: &mut App) {
|
||||
app.add_systems(
|
||||
Startup,
|
||||
(spawn_camera, spawn_player, spawn_ui),
|
||||
)
|
||||
app.add_systems(Startup, (spawn_camera, spawn_player, spawn_ui))
|
||||
.insert_resource(ClearColor(BACKGROUND_COLOR))
|
||||
.insert_resource(WorldSize {
|
||||
width: WINDOW_SIZE.x,
|
||||
@@ -22,16 +19,15 @@ impl Plugin for AsteroidPlugin {
|
||||
.insert_resource(Score(0))
|
||||
.add_systems(
|
||||
FixedUpdate,
|
||||
(input_ship_thruster, input_ship_rotation, wrap_entities).run_if(in_state(GameState::Playing)),
|
||||
(input_ship_thruster, input_ship_rotation, wrap_entities)
|
||||
.run_if(in_state(GameState::Playing)),
|
||||
)
|
||||
.add_systems(
|
||||
FixedPostUpdate,
|
||||
(integrate_velocity, update_positions, apply_rotation_to_mesh).run_if(in_state(GameState::Playing)),
|
||||
(integrate_velocity, update_positions, apply_rotation_to_mesh)
|
||||
.run_if(in_state(GameState::Playing)),
|
||||
)
|
||||
.add_systems(
|
||||
OnEnter(GameState::TitleScreen),
|
||||
start_screen
|
||||
);
|
||||
.add_systems(OnEnter(GameState::TitleScreen), start_screen);
|
||||
|
||||
app.insert_state(GameState::TitleScreen);
|
||||
}
|
||||
@@ -259,7 +255,7 @@ fn spawn_ui(mut commands: Commands, score: Res<Score>, lives: Res<Lives>) {
|
||||
font_size: 25.0,
|
||||
..default()
|
||||
},
|
||||
)
|
||||
),
|
||||
]));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user