From bd929fd2792ae24ebb7ce991a2e20a150ffad07e Mon Sep 17 00:00:00 2001 From: Thom Bruce Date: Mon, 9 Oct 2023 02:20:32 +0100 Subject: [PATCH] restructure use imports --- src/astronomy/orbit.rs | 2 +- src/astronomy/planetary_system.rs | 3 ++- src/main.rs | 21 ++++++++++++--------- src/menus/pause.rs | 6 ++++-- src/menus/start_menu.rs | 6 ++++-- 5 files changed, 23 insertions(+), 15 deletions(-) diff --git a/src/astronomy/orbit.rs b/src/astronomy/orbit.rs index 702f93a..e1d70b6 100644 --- a/src/astronomy/orbit.rs +++ b/src/astronomy/orbit.rs @@ -1,6 +1,6 @@ use bevy::prelude::*; -use crate::{resources::game_time::GameTime, resources::state::GameState}; +use crate::resources::{game_time::GameTime, state::GameState}; const ORBITAL_PERIOD_SCALING_FACTOR: f32 = 1.0; diff --git a/src/astronomy/planetary_system.rs b/src/astronomy/planetary_system.rs index f975130..7ebb593 100644 --- a/src/astronomy/planetary_system.rs +++ b/src/astronomy/planetary_system.rs @@ -1,7 +1,8 @@ use bevy::prelude::*; use crate::{ - hud::indicator::Indicated, resources::assets::SpriteAssets, resources::state::GameState, + hud::indicator::Indicated, + resources::{assets::SpriteAssets, state::GameState}, }; use super::{ diff --git a/src/main.rs b/src/main.rs index 308ab59..3f20729 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,17 +13,20 @@ mod shaders; mod ship; use crate::{ - astronomy::planetary_system::PlanetarySystemPlugin, - astronomy::starfield::BackgroundPlugin, + astronomy::{planetary_system::PlanetarySystemPlugin, starfield::BackgroundPlugin}, effects::blink::EffectsPlugin, hud::HudPlugin, - menus::credits::CreditsPlugin, - menus::pause::PausePlugin, - menus::start_menu::{MenuAction, MenuPlugin}, - resources::assets::{AudioAssets, SpriteAssets, UiAssets}, - resources::camera::CameraPlugin, - resources::game_time::GameTimePlugin, - resources::state::{GameState, StatePlugin}, + menus::{ + credits::CreditsPlugin, + pause::PausePlugin, + start_menu::{MenuAction, MenuPlugin}, + }, + resources::{ + assets::{AudioAssets, SpriteAssets, UiAssets}, + camera::CameraPlugin, + game_time::GameTimePlugin, + state::{GameState, StatePlugin}, + }, ship::ShipPlugin, }; diff --git a/src/menus/pause.rs b/src/menus/pause.rs index f2adf4b..4a59607 100644 --- a/src/menus/pause.rs +++ b/src/menus/pause.rs @@ -7,8 +7,10 @@ use leafwing_input_manager::{ use crate::{ effects::blink::DrawBlinkTimer, - resources::assets::UiAssets, - resources::state::{is_in_game_state, ForState, GameState}, + resources::{ + assets::UiAssets, + state::{is_in_game_state, ForState, GameState}, + }, }; #[derive(Actionlike, PartialEq, Eq, Clone, Copy, Hash, Debug, Reflect)] diff --git a/src/menus/start_menu.rs b/src/menus/start_menu.rs index 5ed8bfb..df38904 100644 --- a/src/menus/start_menu.rs +++ b/src/menus/start_menu.rs @@ -6,8 +6,10 @@ use leafwing_input_manager::{ use crate::{ effects::blink::DrawBlinkTimer, - resources::assets::{AudioAssets, UiAssets}, - resources::state::{is_in_menu_state, ForState, GameState}, + resources::{ + assets::{AudioAssets, UiAssets}, + state::{is_in_menu_state, ForState, GameState}, + }, }; #[derive(Actionlike, PartialEq, Eq, Clone, Copy, Hash, Debug, Reflect)]