generated from tipragot/rust
Implement generic online system #82
|
@ -1,6 +1,5 @@
|
||||||
//! The main entry point of the game.
|
//! The main entry point of the game.
|
||||||
|
|
||||||
use bevnet::NetworkPlugin;
|
|
||||||
use bevy::prelude::*;
|
use bevy::prelude::*;
|
||||||
use border_wars::camera::CameraPlugin;
|
use border_wars::camera::CameraPlugin;
|
||||||
use border_wars::map::renderer::RendererPlugin;
|
use border_wars::map::renderer::RendererPlugin;
|
||||||
|
@ -16,6 +15,5 @@ fn main() {
|
||||||
.add_plugins(CameraPlugin)
|
.add_plugins(CameraPlugin)
|
||||||
.add_plugins(SelectTilePlugin)
|
.add_plugins(SelectTilePlugin)
|
||||||
.add_plugins(NetworkingPlugin)
|
.add_plugins(NetworkingPlugin)
|
||||||
.add_plugins(NetworkPlugin::new("relay.cocosol.fr".to_string()))
|
|
||||||
.run();
|
.run();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
//! All the code related to the networking.
|
//! All the code related to the networking.
|
||||||
|
|
||||||
use bevnet::Connection;
|
use bevnet::{Connection, NetworkPlugin};
|
||||||
use bevy::prelude::*;
|
use bevy::prelude::*;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
@ -14,7 +14,8 @@ pub struct NetworkingPlugin;
|
||||||
|
|
||||||
impl Plugin for NetworkingPlugin {
|
impl Plugin for NetworkingPlugin {
|
||||||
fn build(&self, app: &mut App) {
|
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>();
|
.init_resource::<AllPlayers>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue