2021-11-06 05:32:55 +00:00
|
|
|
use bevy::prelude::*;
|
2022-01-12 08:18:13 +00:00
|
|
|
use cyber_rider::{
|
2022-01-14 00:54:43 +00:00
|
|
|
action::{CyberPhysicsPlugin, MovementSettings},
|
2022-01-12 08:18:13 +00:00
|
|
|
camera::CyberCamPlugin,
|
|
|
|
disable_mouse_trap,
|
|
|
|
geometry::CyberGeomPlugin,
|
|
|
|
input::CyberInputPlugin,
|
|
|
|
lights::CyberSpaceLightsPlugin,
|
|
|
|
ui::CyberUIPlugin,
|
|
|
|
};
|
|
|
|
|
|
|
|
const MOVEMENT_SETTINGS: MovementSettings = MovementSettings {
|
|
|
|
sensitivity: 0.3, // default: 1.0
|
|
|
|
accel: 20.0, // default: 40.0
|
|
|
|
drag: 0.0001, // default: 0.0005
|
|
|
|
gravity: 10.0, // default: 10.0
|
|
|
|
};
|
2021-11-06 05:32:55 +00:00
|
|
|
|
|
|
|
fn main() {
|
2021-12-20 07:11:23 +00:00
|
|
|
App::new()
|
2021-11-06 05:32:55 +00:00
|
|
|
.insert_resource(Msaa { samples: 4 })
|
|
|
|
.add_plugins(DefaultPlugins)
|
2022-01-12 08:18:13 +00:00
|
|
|
.add_plugin(CyberGeomPlugin)
|
|
|
|
.add_plugin(CyberInputPlugin)
|
|
|
|
.add_plugin(CyberPhysicsPlugin)
|
|
|
|
.insert_resource(MOVEMENT_SETTINGS)
|
|
|
|
.add_plugin(CyberCamPlugin)
|
|
|
|
.add_plugin(CyberSpaceLightsPlugin)
|
|
|
|
.add_plugin(CyberUIPlugin)
|
|
|
|
.add_startup_system(disable_mouse_trap)
|
2021-12-20 07:11:23 +00:00
|
|
|
.add_system(bevy::input::system::exit_on_esc_system)
|
2021-11-06 05:32:55 +00:00
|
|
|
.run();
|
|
|
|
}
|