A multiplayer VR framework w/voice chat
1use std::sync::mpsc::channel; 2 3use bevy::{DefaultPlugins, app::{App, FixedUpdate, Startup, Update}, ecs::system::Commands}; 4 5use crate::{net::component::ClientNetworkingManager, setup::setup}; 6 7mod debug_camera; 8 9mod setup; 10mod net; 11 12fn main() { 13 dotenvy::dotenv().unwrap(); 14 15 let (sender, recv) = channel(); 16 let net_manager = ClientNetworkingManager::from(sender); 17 18 net::handle_net(recv).expect("Network Module Failed."); 19 20 App::new() 21 .add_plugins(DefaultPlugins) 22 .add_systems(Startup, setup) 23 .add_systems(Startup, move | mut commands: Commands | { 24 commands.spawn(net_manager.clone()); 25 }) 26 .add_systems(Update, debug_camera::update) 27 .add_systems(FixedUpdate, debug_camera::fixed_update) 28 .run(); 29}