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 crate::config::{BACKGROUND_COLOR, PLAYER_SHIP_COLOR, SHIP_ROTATION, SHIP_THRUST, WINDOW_SIZE};
use bevy::prelude::*; use bevy::prelude::*;
use bevy_inspector_egui::InspectorOptions;
use bevy_inspector_egui::prelude::ReflectInspectorOptions; use bevy_inspector_egui::prelude::ReflectInspectorOptions;
use bevy_inspector_egui::InspectorOptions;
use config::{SHIP_THRUSTER_COLOR_ACTIVE, SHIP_THRUSTER_COLOR_INACTIVE}; use config::{SHIP_THRUSTER_COLOR_ACTIVE, SHIP_THRUSTER_COLOR_INACTIVE};
@@ -14,7 +14,10 @@ pub struct AsteroidPlugin;
impl Plugin for AsteroidPlugin { impl Plugin for AsteroidPlugin {
fn build(&self, app: &mut App) { fn build(&self, app: &mut App) {
app.add_plugins(title_screen::GameMenuPlugin) 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(ClearColor(BACKGROUND_COLOR))
.insert_resource(WorldSize { .insert_resource(WorldSize {
width: WINDOW_SIZE.x, width: WINDOW_SIZE.x,

View File

@@ -5,9 +5,8 @@ use bevy::prelude::*;
pub struct GameMenuPlugin; pub struct GameMenuPlugin;
impl Plugin for GameMenuPlugin { impl Plugin for GameMenuPlugin {
fn build(&self, app: &mut App){ fn build(&self, app: &mut App) {
app app.add_systems(OnEnter(GameState::TitleScreen), spawn_menu)
.add_systems(OnEnter(GameState::TitleScreen), spawn_menu)
.add_systems(OnExit(GameState::TitleScreen), despawn_menu); .add_systems(OnExit(GameState::TitleScreen), despawn_menu);
} }
} }