autoformat

This commit is contained in:
2025-07-27 10:31:24 -05:00
parent f68d841e52
commit 9a2381249f
2 changed files with 12 additions and 10 deletions

View File

@@ -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,

View File

@@ -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!();
}
todo!();
}