From 9a2381249f0211d6b91df9d00a1cbd25cde568ed Mon Sep 17 00:00:00 2001 From: Robert Garrett Date: Sun, 27 Jul 2025 10:31:24 -0500 Subject: [PATCH] autoformat --- src/lib.rs | 7 +++++-- src/title_screen.rs | 15 +++++++-------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 4fa9c50..bcab029 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,8 +4,8 @@ mod title_screen; use crate::config::{BACKGROUND_COLOR, PLAYER_SHIP_COLOR, SHIP_ROTATION, SHIP_THRUST, WINDOW_SIZE}; use bevy::prelude::*; -use bevy_inspector_egui::InspectorOptions; use bevy_inspector_egui::prelude::ReflectInspectorOptions; +use bevy_inspector_egui::InspectorOptions; use config::{SHIP_THRUSTER_COLOR_ACTIVE, SHIP_THRUSTER_COLOR_INACTIVE}; @@ -14,7 +14,10 @@ pub struct AsteroidPlugin; impl Plugin for AsteroidPlugin { fn build(&self, app: &mut App) { app.add_plugins(title_screen::GameMenuPlugin) - .add_systems(OnEnter(GameState::Playing), (spawn_camera, spawn_player, spawn_ui)) + .add_systems( + OnEnter(GameState::Playing), + (spawn_camera, spawn_player, spawn_ui), + ) .insert_resource(ClearColor(BACKGROUND_COLOR)) .insert_resource(WorldSize { width: WINDOW_SIZE.x, diff --git a/src/title_screen.rs b/src/title_screen.rs index 2b83e40..8299d1c 100644 --- a/src/title_screen.rs +++ b/src/title_screen.rs @@ -5,11 +5,10 @@ use bevy::prelude::*; pub struct GameMenuPlugin; impl Plugin for GameMenuPlugin { - fn build(&self, app: &mut App){ - app - .add_systems(OnEnter(GameState::TitleScreen), spawn_menu) - .add_systems(OnExit(GameState::TitleScreen), despawn_menu); - } + fn build(&self, app: &mut App) { + app.add_systems(OnEnter(GameState::TitleScreen), spawn_menu) + .add_systems(OnExit(GameState::TitleScreen), despawn_menu); + } } // Marker component for the title screen UI entity. @@ -18,7 +17,7 @@ impl Plugin for GameMenuPlugin { struct TitleUI; fn spawn_menu(mut commands: Commands) { - commands.spawn(Camera2d); + commands.spawn(Camera2d); commands .spawn(( TitleUI, @@ -40,5 +39,5 @@ fn spawn_menu(mut commands: Commands) { } fn despawn_menu() { - todo!(); -} \ No newline at end of file + todo!(); +}