diff --git a/src/components.rs b/src/components.rs index 6b02234..e19bbf9 100644 --- a/src/components.rs +++ b/src/components.rs @@ -1,5 +1,4 @@ use bevy::prelude::*; -use std::time::Duration; // Needed for Timer in Player // --- Components --- #[derive(Component)] diff --git a/src/enemy.rs b/src/enemy.rs index 5cacf51..8cda903 100644 --- a/src/enemy.rs +++ b/src/enemy.rs @@ -2,16 +2,13 @@ use bevy::prelude::*; use std::time::Duration; use crate::components::{Enemy, EnemyBullet, EnemyState, EnemyType, FormationTarget}; -use crate::constants::{ // Added WINDOW_WIDTH - ENEMY_BULLET_PLAYER_COLLISION_THRESHOLD, ENEMY_BULLET_SIZE, ENEMY_BULLET_SPEED, - ENEMY_SHOOT_INTERVAL, ENEMY_SIZE, ENEMY_SPEED, FORMATION_BASE_Y, FORMATION_COLS, - FORMATION_ENEMY_COUNT, FORMATION_X_SPACING, FORMATION_Y_SPACING, WINDOW_HEIGHT, WINDOW_WIDTH, +use crate::constants::{ // Only keeping used constants + ENEMY_BULLET_SIZE, ENEMY_SIZE, ENEMY_SPEED, WINDOW_HEIGHT, WINDOW_WIDTH, }; use crate::resources::{ - AttackDiveTimer, CurrentStage, EnemySpawnTimer, FormationState, PlayerLives, - PlayerRespawnTimer, StageConfigurations, // Make sure StageConfigurations is imported if not already + AttackDiveTimer, CurrentStage, EnemySpawnTimer, FormationState, + StageConfigurations, }; -use crate::game_state::AppState; pub fn spawn_enemies( mut commands: Commands, @@ -278,8 +275,6 @@ pub fn trigger_attack_dives( // Only proceed if the timer finished AND the formation is complete if timer.timer.just_finished() && formation_state.formation_complete { - // Find all enemies currently in formation - let mut available_enemies: Vec = Vec::new(); // Get the current stage config let config_index = (stage.number as usize - 1) % stage_configs.stages.len(); let current_config = &stage_configs.stages[config_index]; diff --git a/src/resources.rs b/src/resources.rs index 7a21d4e..bd2970c 100644 --- a/src/resources.rs +++ b/src/resources.rs @@ -1,5 +1,4 @@ use bevy::prelude::*; -use std::time::Duration; // Needed for Timer // --- Resources --- #[derive(Resource)] diff --git a/src/systems.rs b/src/systems.rs index ce23cb1..d87a2a7 100644 --- a/src/systems.rs +++ b/src/systems.rs @@ -1,7 +1,7 @@ use bevy::prelude::*; use crate::components::{Invincible, Player}; -use crate::resources::{CurrentStage, FormationState, PlayerLives, Score}; +use crate::resources::{CurrentStage, PlayerLives, Score}; use crate::player::spawn_player_ship; // Import the helper function // --- Setup ---