generated from tipragot/rust
save
This commit is contained in:
parent
4faf8b781d
commit
c090fabbd5
|
@ -19,7 +19,7 @@ impl Plugin for NetworkingPlugin {
|
||||||
fn build(&self, app: &mut App) {
|
fn build(&self, app: &mut App) {
|
||||||
app.add_plugins(NetworkPlugin::new("relay.cocosol.fr".to_string()))
|
app.add_plugins(NetworkPlugin::new("relay.cocosol.fr".to_string()))
|
||||||
.add_plugins(ConnectionPlugin)
|
.add_plugins(ConnectionPlugin)
|
||||||
.add_systems(Update, start_game)
|
.add_systems(Update, handle_start_game)
|
||||||
.add_network_event::<StartGame>()
|
.add_network_event::<StartGame>()
|
||||||
.add_plugins(CheckConnectionPlugin);
|
.add_plugins(CheckConnectionPlugin);
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ pub enum PlayerRank {
|
||||||
pub struct StartGame(pub StartMapGeneration);
|
pub struct StartGame(pub StartMapGeneration);
|
||||||
|
|
||||||
/// A fonction that handle the start of the game.
|
/// A fonction that handle the start of the game.
|
||||||
fn start_game(
|
fn handle_start_game(
|
||||||
mut next_stats: ResMut<NextState<CurrentScene>>,
|
mut next_stats: ResMut<NextState<CurrentScene>>,
|
||||||
mut start_game_events: EventReader<Receive<StartGame>>,
|
mut start_game_events: EventReader<Receive<StartGame>>,
|
||||||
mut start_map_generation_writer: EventWriter<StartMapGeneration>,
|
mut start_map_generation_writer: EventWriter<StartMapGeneration>,
|
||||||
|
|
Loading…
Reference in a new issue