Add Peer UI display
This commit is contained in:
parent
e883f201c0
commit
c29344ba6d
3 changed files with 80 additions and 7 deletions
|
|
@ -13,7 +13,7 @@ use super::{
|
|||
check_for_seed, setup_balls, setup_camera, setup_from_seed, setup_player, setup_walls,
|
||||
},
|
||||
state::AppState,
|
||||
ui::{setup_seed_display, update_seed_display},
|
||||
ui::{setup_peer_ui, setup_seed_ui, update_peer_ui, update_peer_ui_timings, update_seed_ui},
|
||||
};
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
|
|
@ -59,7 +59,7 @@ impl Plugin for GamePlugin {
|
|||
PhysicsPlugins::default().with_length_unit(50.0),
|
||||
))
|
||||
.init_state::<AppState>()
|
||||
.add_systems(Startup, (setup_camera, setup_seed_display))
|
||||
.add_systems(Startup, (setup_camera, setup_seed_ui, setup_peer_ui))
|
||||
.add_systems(
|
||||
OnEnter(AppState::InGame),
|
||||
(
|
||||
|
|
@ -84,7 +84,9 @@ impl Plugin for GamePlugin {
|
|||
(
|
||||
((move_player, move_camera).chain(), zoom_camera)
|
||||
.run_if(in_state(AppState::InGame)),
|
||||
update_seed_display,
|
||||
update_seed_ui,
|
||||
(update_peer_ui, update_peer_ui_timings)
|
||||
.run_if(in_state(NetworkState::MultiPlayer)),
|
||||
quit.run_if(input_pressed(KeyCode::KeyQ)),
|
||||
),
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue