Add Seed display

This commit is contained in:
Michael Bradley 2025-07-05 21:36:17 -04:00
parent 58795eb87e
commit e883f201c0
Signed by: MichaelBradley
SSH key fingerprint: SHA256:o/aaeYtRubILK7OYYjYP12DmU7BsPUhKji1AgaQ+ge4
4 changed files with 39 additions and 3 deletions

View file

@ -9,8 +9,11 @@ use super::{
net::{handle_deleted_peer, handle_incoming_packets, handle_new_peer},
runtime::{move_camera, move_player, quit, zoom_camera},
seed::Seed,
setup::{check_for_seed, setup_balls, setup_from_seed, setup_player, setup_ui, setup_walls},
setup::{
check_for_seed, setup_balls, setup_camera, setup_from_seed, setup_player, setup_walls,
},
state::AppState,
ui::{setup_seed_display, update_seed_display},
};
#[derive(Debug, Clone, Copy)]
@ -56,7 +59,7 @@ impl Plugin for GamePlugin {
PhysicsPlugins::default().with_length_unit(50.0),
))
.init_state::<AppState>()
.add_systems(Startup, setup_ui)
.add_systems(Startup, (setup_camera, setup_seed_display))
.add_systems(
OnEnter(AppState::InGame),
(
@ -81,6 +84,7 @@ impl Plugin for GamePlugin {
(
((move_player, move_camera).chain(), zoom_camera)
.run_if(in_state(AppState::InGame)),
update_seed_display,
quit.run_if(input_pressed(KeyCode::KeyQ)),
),
);