experiment/src/main.rs

46 lines
1.2 KiB
Rust

#![feature(step_trait)]
#![feature(trivial_bounds)]
#![feature(return_position_impl_trait_in_trait)]
use bevy::prelude::*;
use bevy_gltf_components::ComponentsFromGltfPlugin;
use bevy_rapier3d::prelude::*;
use comps::core::markers::proxy;
use scenes::scene1;
use ui::{editor::plugin::MainEditorUiPlugin, game::plugin::MainGameUIPlugin};
mod comps;
mod constants;
mod logic;
mod scenes;
mod setup;
mod ui;
mod utils;
fn main() {
let mut application = App::new();
setup_plugins(&mut application);
load(&mut application);
application.run();
}
fn setup_plugins(application: &mut App) {
application
.add_plugins(DefaultPlugins.set(AssetPlugin::default()))
//.add_plugins(DefaultInspectorConfigPlugin)
.add_plugins(RapierPhysicsPlugin::<NoUserData>::default())
//.add_plugins(RapierDebugRenderPlugin::default())
.add_plugins(ComponentsFromGltfPlugin)
//.add_plugins(bevy_egui::EguiPlugin)
//.add_plugins(WorldInspectorPlugin::new())
.add_plugins(proxy::plugin::ProxyComponentsPlugin)
.add_plugins(MainGameUIPlugin)
.add_plugins(MainEditorUiPlugin);
}
fn load(application: &mut App) {
scene1::init::load_scene(application);
}