-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
59 additions
and
14 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
use bevy::{app::PluginGroupBuilder, prelude::PluginGroup}; | ||
use map::MapLoaderPlugin; | ||
use readiness::ReadinessPlugin; | ||
|
||
mod map; | ||
mod readiness; | ||
|
||
pub struct LoaderPluginGroup; | ||
|
||
impl PluginGroup for LoaderPluginGroup { | ||
fn build(self) -> PluginGroupBuilder { | ||
PluginGroupBuilder::start::<Self>().add(MapLoaderPlugin) | ||
PluginGroupBuilder::start::<Self>() | ||
.add(MapLoaderPlugin) | ||
.add(ReadinessPlugin) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
use bevy::prelude::*; | ||
use de_core::gamestate::GameState; | ||
use de_messages::Readiness; | ||
use de_multiplayer::SetReadinessEvent; | ||
|
||
pub(crate) struct ReadinessPlugin; | ||
|
||
impl Plugin for ReadinessPlugin { | ||
fn build(&self, app: &mut App) { | ||
app.add_systems( | ||
OnEnter(GameState::Waiting), | ||
set_readiness(Readiness::Prepared), | ||
); | ||
// TODO | ||
} | ||
} | ||
|
||
fn set_readiness(readiness: Readiness) -> impl Fn(EventWriter<SetReadinessEvent>) { | ||
move |mut events: EventWriter<SetReadinessEvent>| { | ||
events.send(SetReadinessEvent::from(readiness)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters