add lean resource
This commit is contained in:
parent
80e2a79de1
commit
3fc0a3e45c
1 changed files with 7 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
||||||
use bevy::{
|
use bevy::{
|
||||||
diagnostic::FrameTimeDiagnosticsPlugin,
|
diagnostic::FrameTimeDiagnosticsPlugin,
|
||||||
prelude::{App, IntoSystemDescriptor, Plugin},
|
prelude::{App, IntoSystemDescriptor, Plugin, Resource},
|
||||||
};
|
};
|
||||||
use bevy_rapier3d::prelude::{NoUserData, RapierPhysicsPlugin};
|
use bevy_rapier3d::prelude::{NoUserData, RapierPhysicsPlugin};
|
||||||
|
|
||||||
|
@ -10,6 +10,11 @@ mod systems;
|
||||||
pub use components::*;
|
pub use components::*;
|
||||||
use systems::*;
|
use systems::*;
|
||||||
|
|
||||||
|
#[derive(Resource, Default)]
|
||||||
|
struct CyberLean {
|
||||||
|
pub lean: f32,
|
||||||
|
}
|
||||||
|
|
||||||
pub struct CyberActionPlugin;
|
pub struct CyberActionPlugin;
|
||||||
impl Plugin for CyberActionPlugin {
|
impl Plugin for CyberActionPlugin {
|
||||||
fn build(&self, app: &mut App) {
|
fn build(&self, app: &mut App) {
|
||||||
|
@ -17,6 +22,7 @@ impl Plugin for CyberActionPlugin {
|
||||||
.register_type::<MovementSettings>()
|
.register_type::<MovementSettings>()
|
||||||
.init_resource::<CatControllerSettings>()
|
.init_resource::<CatControllerSettings>()
|
||||||
.init_resource::<ActionDebugInstant>()
|
.init_resource::<ActionDebugInstant>()
|
||||||
|
.init_resource::<CyberLean>()
|
||||||
.register_type::<CatControllerSettings>()
|
.register_type::<CatControllerSettings>()
|
||||||
.add_plugin(RapierPhysicsPlugin::<NoUserData>::default())
|
.add_plugin(RapierPhysicsPlugin::<NoUserData>::default())
|
||||||
.add_plugin(FrameTimeDiagnosticsPlugin::default())
|
.add_plugin(FrameTimeDiagnosticsPlugin::default())
|
||||||
|
|
Loading…
Reference in a new issue