diff --git a/src/navigation.rs b/src/navigation.rs index 74bfab9..a015578 100644 --- a/src/navigation.rs +++ b/src/navigation.rs @@ -1,4 +1,4 @@ -use std::{collections::HashMap, error::Error, fmt::Debug, hash::Hash}; +use std::{collections::HashMap, error::Error, fmt::Debug, hash::Hash, marker::PhantomData}; use bevy::prelude::*; use bevy_input_actionmap::InputMap; @@ -68,17 +68,10 @@ pub struct Collision { pub index: usize, } -pub const ACTION_FORWARD: &str = "forward"; -pub const ACTION_BACKWARD: &str = "backward"; -pub const ACTION_LEFT: &str = "left"; -pub const ACTION_RIGHT: &str = "right"; -pub const ACTION_ROTATE_LEFT: &str = "ROTATE_LEFT"; -pub const ACTION_ROTATE_RIGHT: &str = "ROTATE_RIGHT"; -pub const ACTION_SPRINT: &str = "SPRINT"; - -fn movement_controls( +fn movement_controls( mut commands: Commands, - input: Res>, + config: Res>, + input: Res>, time: Res