Create generic distribution system
Still incredibly basic and only handles initial distribution and spawning with no relationships or anything.
This commit is contained in:
parent
d76afe92f0
commit
4db82f328b
5 changed files with 66 additions and 8 deletions
|
@ -4,20 +4,15 @@ use bevy::prelude::*;
|
|||
use uuid::Uuid;
|
||||
|
||||
use super::{
|
||||
distribution::Networked,
|
||||
io::{Config, handle_network_input, handle_network_output, heartbeat, timeout},
|
||||
packet::{InboundPacket, OutboundPacket},
|
||||
peer::{Peer, PeerChangeEvent, PeerMap, handle_new_peer, handle_peer_change},
|
||||
queues::{NetworkReceive, NetworkSend},
|
||||
socket::bind_socket,
|
||||
state::NetworkState,
|
||||
};
|
||||
|
||||
#[derive(States, Default, Debug, Clone, PartialEq, Eq, Hash)]
|
||||
pub enum NetworkState {
|
||||
#[default]
|
||||
SinglePlayer,
|
||||
MultiPlayer,
|
||||
}
|
||||
|
||||
pub struct NetIOPlugin {
|
||||
listen: u16,
|
||||
peer: Option<SocketAddr>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue