cyber_rider/src/main.rs

40 lines
1.2 KiB
Rust
Raw Normal View History

2021-11-06 05:32:55 +00:00
use bevy::prelude::*;
use cyber_rider::{
action::{CyberActionPlugin, MovementSettings},
camera::CyberCamPlugin,
disable_mouse_trap,
geometry::CyberGeomPlugin,
2022-01-14 06:05:51 +00:00
glamor::CyberGlamorPlugin,
input::CyberInputPlugin,
lights::CyberSpaceLightsPlugin,
ui::CyberUIPlugin,
};
const MOVEMENT_SETTINGS: MovementSettings = MovementSettings {
sensitivity: 10.0, // default: 1.0
2022-02-21 21:08:49 +00:00
accel: 10.0, // default: 40.0
};
2021-11-06 05:32:55 +00:00
fn main() {
2022-01-14 06:05:51 +00:00
let mut app = App::new();
app.insert_resource(Msaa { samples: 4 })
.insert_resource(ClearColor(Color::rgb(0.07, 0.001, 0.02)))
2021-11-06 05:32:55 +00:00
.add_plugins(DefaultPlugins)
2022-02-21 21:08:49 +00:00
//.add_plugin(LogDiagnosticsPlugin::default())
//.add_plugin(FrameTimeDiagnosticsPlugin::default())
.add_plugin(CyberGeomPlugin)
2022-01-14 06:05:51 +00:00
.add_plugin(CyberGlamorPlugin)
.add_plugin(CyberInputPlugin)
.add_plugin(CyberActionPlugin)
.insert_resource(MOVEMENT_SETTINGS)
.add_plugin(CyberCamPlugin)
.add_plugin(CyberSpaceLightsPlugin)
.add_plugin(CyberUIPlugin)
.add_startup_system(disable_mouse_trap)
2022-01-14 06:05:51 +00:00
.add_system(bevy::input::system::exit_on_esc_system);
//bevy_mod_debugdump::print_schedule(&mut app);
app.run();
2021-11-06 05:32:55 +00:00
}