Start game from the lobby by the admin #86

Merged
raphael merged 8 commits from start-game into main 2024-03-31 13:47:28 +00:00
Showing only changes of commit c090fabbd5 - Show all commits

View file

@ -19,7 +19,7 @@ impl Plugin for NetworkingPlugin {
fn build(&self, app: &mut App) {
app.add_plugins(NetworkPlugin::new("relay.cocosol.fr".to_string()))
.add_plugins(ConnectionPlugin)
.add_systems(Update, start_game)
.add_systems(Update, handle_start_game)
.add_network_event::<StartGame>()
.add_plugins(CheckConnectionPlugin);
}
@ -43,7 +43,7 @@ pub enum PlayerRank {
pub struct StartGame(pub StartMapGeneration);
/// A fonction that handle the start of the game.
fn start_game(
fn handle_start_game(
mut next_stats: ResMut<NextState<CurrentScene>>,
mut start_game_events: EventReader<Receive<StartGame>>,
mut start_map_generation_writer: EventWriter<StartMapGeneration>,