Begin GameOver scene, widget spawner works

I've taken a lot directly from the Bevy UI button example.
(https://bevy.org/examples/ui-user-interface/button/)

I'll make it look better later. For now, it just needs to exist. Onward
to the UI operation system!
This commit is contained in:
2025-08-13 11:58:11 -05:00
parent 54ef257ab4
commit 2f9401e93f
3 changed files with 80 additions and 2 deletions

View File

@@ -35,6 +35,7 @@ impl Plugin for AsteroidPlugin {
fn build(&self, app: &mut App) {
app.add_plugins((
widgets::PluginGameMenu,
widgets::PluginGameOver,
widgets::PluginGetReady,
RapierPhysicsPlugin::<NoUserData>::pixels_per_meter(10.0),
RapierDebugRenderPlugin::default(),
@@ -80,7 +81,7 @@ impl Plugin for AsteroidPlugin {
.add_event::<events::AsteroidDestroy>()
.add_event::<events::ShipDestroy>()
.add_event::<events::BulletDestroy>();
app.insert_state(GameState::Playing);
app.insert_state(GameState::GameOver);
}
}