generated from tipragot/rust
Start game from the lobby by the admin #86
|
@ -35,11 +35,11 @@ pub enum PlayerRank {
|
||||||
Player,
|
Player,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// TODO
|
/// The event to start the game send by the admin.
|
||||||
#[derive(Event, Serialize, Deserialize)]
|
#[derive(Event, Serialize, Deserialize)]
|
||||||
pub struct StartGame(pub StartMapGeneration);
|
pub struct StartGame(pub StartMapGeneration);
|
||||||
|
|
||||||
/// TODO
|
/// A fonction that handle the start of the game.
|
||||||
fn start_game(
|
fn 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>>,
|
||||||
|
|
|
@ -87,6 +87,7 @@ fn lobby_ui(
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Get the map sizes form a given number of players.
|
||||||
fn get_map_sizes(number_of_players: u64) -> Vec<u64> {
|
fn get_map_sizes(number_of_players: u64) -> Vec<u64> {
|
||||||
let mut result = Vec::with_capacity(6);
|
let mut result = Vec::with_capacity(6);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue