Implement generic online system #82

Merged
CoCo_Sol merged 14 commits from impl-online into main 2024-03-25 05:45:17 +00:00
2 changed files with 3 additions and 4 deletions
Showing only changes of commit cd8b181f1d - Show all commits

View file

@ -1,6 +1,5 @@
//! The main entry point of the game.
use bevnet::NetworkPlugin;
use bevy::prelude::*;
use border_wars::camera::CameraPlugin;
use border_wars::map::renderer::RendererPlugin;
@ -16,6 +15,5 @@ fn main() {
.add_plugins(CameraPlugin)
.add_plugins(SelectTilePlugin)
.add_plugins(NetworkingPlugin)
.add_plugins(NetworkPlugin::new("relay.cocosol.fr".to_string()))
.run();
}

View file

@ -1,6 +1,6 @@
//! All the code related to the networking.
use bevnet::Connection;
use bevnet::{Connection, NetworkPlugin};
use bevy::prelude::*;
use serde::{Deserialize, Serialize};
@ -14,7 +14,8 @@ pub struct NetworkingPlugin;
impl Plugin for NetworkingPlugin {
fn build(&self, app: &mut App) {
app.add_plugins(ConnectionPuglin)
app.add_plugins(NetworkPlugin::new("relay.cocosol.fr".to_string()))
.add_plugins(ConnectionPuglin)
.init_resource::<AllPlayers>();
}
}