generated from tipragot/rust
Start game from the lobby by the admin #86
|
@ -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>,
|
||||
|
|
Loading…
Reference in a new issue