Implement the HUD for real
Now it works!... but it runs every single frame, probably causing a bunch of unnecessary text rendering and UI layout operations. I'll have to come back and make it event-based at some point.
This commit is contained in:
@@ -37,6 +37,7 @@ impl Plugin for AsteroidPlugin {
|
||||
widgets::PluginGameMenu,
|
||||
widgets::PluginGameOver,
|
||||
widgets::PluginGetReady,
|
||||
widgets::PluginGameHud,
|
||||
RapierPhysicsPlugin::<NoUserData>::pixels_per_meter(10.0),
|
||||
RapierDebugRenderPlugin::default(),
|
||||
))
|
||||
@@ -48,10 +49,7 @@ impl Plugin for AsteroidPlugin {
|
||||
.insert_resource(AsteroidSpawner::new())
|
||||
.init_resource::<GameAssets>()
|
||||
.add_systems(Startup, spawn_camera)
|
||||
.add_systems(
|
||||
OnEnter(GameState::Playing),
|
||||
(objects::spawn_player, widgets::spawn_ui),
|
||||
)
|
||||
.add_systems(OnEnter(GameState::Playing), objects::spawn_player)
|
||||
.add_systems(
|
||||
FixedUpdate,
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user