Move the ship & bullet systems into the object mod

This commit is contained in:
2025-08-11 23:01:14 -05:00
parent 619037dab0
commit 1369a3092f
3 changed files with 82 additions and 86 deletions

View File

@@ -4,7 +4,6 @@ mod events;
mod objects;
mod physics;
mod preparation_widget;
mod ship;
mod title_screen;
use crate::asteroids::AsteroidSpawner;
@@ -46,7 +45,10 @@ impl Plugin for AsteroidPlugin {
.insert_resource(AsteroidSpawner::new())
.init_resource::<GameAssets>()
.add_systems(Startup, spawn_camera)
.add_systems(OnEnter(GameState::Playing), (ship::spawn_player, spawn_ui))
.add_systems(
OnEnter(GameState::Playing),
(objects::spawn_player, spawn_ui),
)
.add_systems(
FixedUpdate,
(
@@ -57,8 +59,8 @@ impl Plugin for AsteroidPlugin {
asteroids::tick_asteroid_manager,
objects::spawn_asteroid.after(asteroids::tick_asteroid_manager),
objects::split_asteroids,
ship::bullet_impact_listener,
ship::ship_impact_listener,
objects::bullet_impact_listener,
objects::ship_impact_listener,
collision_listener,
// TODO: Remove debug printing
debug_collision_event_printer,