Move the App setup and module declarations from src/main.rs into a new src/lib.rs that exposes a single pub fn run(). src/main.rs becomes a three-line entry point that calls bglga::run(). This is the standard Bevy-book pattern and lets the game logic be consumed as a library (e.g. for integration tests, headless tooling, or alternate entry points) without duplicating the App wiring. Also gate update_tractor_beam_visual with run_if(any_with_component::<TractorBeam>) so the system only runs while a boss has an active tractor beam, instead of every Update tick. |
||
|---|---|---|
| .. | ||
| bullet.rs | ||
| components.rs | ||
| constants.rs | ||
| enemy.rs | ||
| game_state.rs | ||
| lib.rs | ||
| main.rs | ||
| player.rs | ||
| resources.rs | ||
| stage.rs | ||
| starfield.rs | ||
| systems.rs | ||