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-03-13 22:54:33 +00:00
|
|
|
bike::CyberBikePlugin,
|
2022-01-12 08:18:13 +00:00
|
|
|
camera::CyberCamPlugin,
|
|
|
|
disable_mouse_trap,
|
2022-01-14 06:05:51 +00:00
|
|
|
glamor::CyberGlamorPlugin,
|
2022-01-12 08:18:13 +00:00
|
|
|
input::CyberInputPlugin,
|
|
|
|
lights::CyberSpaceLightsPlugin,
|
2022-03-13 22:54:33 +00:00
|
|
|
planet::CyberPlanetPlugin,
|
2022-01-12 08:18:13 +00:00
|
|
|
ui::CyberUIPlugin,
|
|
|
|
};
|
|
|
|
|
|
|
|
const MOVEMENT_SETTINGS: MovementSettings = MovementSettings {
|
2023-01-23 00:10:59 +00:00
|
|
|
sensitivity: 8.0, // steering
|
|
|
|
accel: 30.0, // thrust
|
|
|
|
gravity: 9.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 })
|
2023-01-20 22:40:51 +00:00
|
|
|
.add_plugins(DefaultPlugins.set(WindowPlugin {
|
|
|
|
window: WindowDescriptor {
|
|
|
|
width: 2560.0,
|
|
|
|
height: 1440.0,
|
|
|
|
..Default::default()
|
|
|
|
},
|
2022-02-24 01:38:24 +00:00
|
|
|
..Default::default()
|
2023-01-20 22:40:51 +00:00
|
|
|
}))
|
2022-02-22 01:04:46 +00:00
|
|
|
.insert_resource(MOVEMENT_SETTINGS)
|
2022-03-13 22:54:33 +00:00
|
|
|
.add_plugin(CyberPlanetPlugin)
|
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
|
|
|
.add_plugin(CyberCamPlugin)
|
|
|
|
.add_plugin(CyberSpaceLightsPlugin)
|
|
|
|
.add_plugin(CyberUIPlugin)
|
2022-03-13 22:54:33 +00:00
|
|
|
.add_plugin(CyberBikePlugin)
|
2022-01-12 08:18:13 +00:00
|
|
|
.add_startup_system(disable_mouse_trap)
|
2022-08-13 22:30:37 +00:00
|
|
|
.add_system(bevy::window::close_on_esc);
|
2022-01-14 06:05:51 +00:00
|
|
|
|
|
|
|
app.run();
|
2021-11-06 05:32:55 +00:00
|
|
|
}
|