add lean resource

This commit is contained in:
Joe Ardent 2023-02-19 20:54:17 -08:00
parent 80e2a79de1
commit 3fc0a3e45c

View file

@ -1,6 +1,6 @@
use bevy::{
diagnostic::FrameTimeDiagnosticsPlugin,
prelude::{App, IntoSystemDescriptor, Plugin},
prelude::{App, IntoSystemDescriptor, Plugin, Resource},
};
use bevy_rapier3d::prelude::{NoUserData, RapierPhysicsPlugin};
@ -10,6 +10,11 @@ mod systems;
pub use components::*;
use systems::*;
#[derive(Resource, Default)]
struct CyberLean {
pub lean: f32,
}
pub struct CyberActionPlugin;
impl Plugin for CyberActionPlugin {
fn build(&self, app: &mut App) {
@ -17,6 +22,7 @@ impl Plugin for CyberActionPlugin {
.register_type::<MovementSettings>()
.init_resource::<CatControllerSettings>()
.init_resource::<ActionDebugInstant>()
.init_resource::<CyberLean>()
.register_type::<CatControllerSettings>()
.add_plugin(RapierPhysicsPlugin::<NoUserData>::default())
.add_plugin(FrameTimeDiagnosticsPlugin::default())