38 lines
1.1 KiB
Rust
38 lines
1.1 KiB
Rust
use bevy::prelude::*;
|
|
use cyber_rider::{
|
|
action::{CyberPhysicsPlugin, MovementSettings},
|
|
camera::CyberCamPlugin,
|
|
disable_mouse_trap,
|
|
geometry::CyberGeomPlugin,
|
|
glamor::CyberGlamorPlugin,
|
|
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
|
|
};
|
|
|
|
fn main() {
|
|
let mut app = App::new();
|
|
app.insert_resource(Msaa { samples: 4 })
|
|
.add_plugins(DefaultPlugins)
|
|
.add_plugin(CyberGeomPlugin)
|
|
.add_plugin(CyberGlamorPlugin)
|
|
.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)
|
|
.add_system(bevy::input::system::exit_on_esc_system);
|
|
|
|
//bevy_mod_debugdump::print_schedule(&mut app);
|
|
|
|
app.run();
|
|
}
|