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.
3 lines
32 B
Rust
3 lines
32 B
Rust
fn main() {
|
|
bglga::run();
|
|
}
|