44 lines
1.3 KiB
Rust
44 lines
1.3 KiB
Rust
use bevy::prelude::*;
|
|
use cyber_rider::{
|
|
action::{CyberActionPlugin, MovementSettings},
|
|
bike::CyberBikePlugin,
|
|
camera::CyberCamPlugin,
|
|
disable_mouse_trap,
|
|
glamor::CyberGlamorPlugin,
|
|
input::CyberInputPlugin,
|
|
lights::CyberSpaceLightsPlugin,
|
|
planet::CyberPlanetPlugin,
|
|
ui::CyberUIPlugin,
|
|
};
|
|
|
|
const MOVEMENT_SETTINGS: MovementSettings = MovementSettings {
|
|
sensitivity: 8.0, // steering
|
|
accel: 30.0, // thrust
|
|
gravity: 9.0,
|
|
};
|
|
|
|
fn main() {
|
|
let mut app = App::new();
|
|
app.insert_resource(Msaa { samples: 4 })
|
|
.add_plugins(DefaultPlugins.set(WindowPlugin {
|
|
window: WindowDescriptor {
|
|
width: 2560.0,
|
|
height: 1440.0,
|
|
..Default::default()
|
|
},
|
|
..Default::default()
|
|
}))
|
|
.insert_resource(MOVEMENT_SETTINGS)
|
|
.add_plugin(CyberPlanetPlugin)
|
|
.add_plugin(CyberGlamorPlugin)
|
|
.add_plugin(CyberInputPlugin)
|
|
.add_plugin(CyberActionPlugin)
|
|
.add_plugin(CyberCamPlugin)
|
|
.add_plugin(CyberSpaceLightsPlugin)
|
|
.add_plugin(CyberUIPlugin)
|
|
.add_plugin(CyberBikePlugin)
|
|
.add_startup_system(disable_mouse_trap)
|
|
.add_system(bevy::window::close_on_esc);
|
|
|
|
app.run();
|
|
}
|