2021-11-06 05:32:55 +00:00
|
|
|
use bevy::prelude::*;
|
2022-01-12 08:18:13 +00:00
|
|
|
use cyber_rider::{
|
2022-02-08 04:28:06 +00:00
|
|
|
action::{CyberActionPlugin, MovementSettings},
|
2022-01-12 08:18:13 +00:00
|
|
|
camera::CyberCamPlugin,
|
|
|
|
disable_mouse_trap,
|
|
|
|
geometry::CyberGeomPlugin,
|
2022-01-14 06:05:51 +00:00
|
|
|
glamor::CyberGlamorPlugin,
|
2022-01-12 08:18:13 +00:00
|
|
|
input::CyberInputPlugin,
|
|
|
|
lights::CyberSpaceLightsPlugin,
|
|
|
|
ui::CyberUIPlugin,
|
|
|
|
};
|
|
|
|
|
|
|
|
const MOVEMENT_SETTINGS: MovementSettings = MovementSettings {
|
2022-02-13 21:58:49 +00:00
|
|
|
sensitivity: 10.0, // default: 1.0
|
2022-02-21 21:08:49 +00:00
|
|
|
accel: 10.0, // default: 40.0
|
2022-01-12 08:18:13 +00:00
|
|
|
};
|
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 })
|
2022-02-13 21:58:49 +00:00
|
|
|
.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())
|
2022-01-12 08:18:13 +00:00
|
|
|
.add_plugin(CyberGeomPlugin)
|
2022-01-14 06:05:51 +00:00
|
|
|
.add_plugin(CyberGlamorPlugin)
|
2022-01-12 08:18:13 +00:00
|
|
|
.add_plugin(CyberInputPlugin)
|
2022-02-08 04:28:06 +00:00
|
|
|
.add_plugin(CyberActionPlugin)
|
2022-01-12 08:18:13 +00:00
|
|
|
.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
|
|
|
}
|