Compare commits
2 Commits
4480b33555
...
45ab161f22
Author | SHA1 | Date | |
---|---|---|---|
45ab161f22 | |||
5a3ce9b790 |
|
@ -31,7 +31,7 @@ coord_2d = "0.3"
|
|||
futures-lite = "1"
|
||||
gilrs = "0.10"
|
||||
here_be_dragons = { version = "0.3", features = ["serde"] }
|
||||
leafwing-input-manager = "0.9"
|
||||
leafwing-input-manager = { git = "https://github.com/ndarilek/leafwing-input-manager", branch = "consume" }
|
||||
maze_generator = "2"
|
||||
once_cell = "1"
|
||||
pathfinding = "4"
|
||||
|
|
|
@ -217,7 +217,8 @@ fn controls(
|
|||
trace!("{entity:?}: Stopped moving");
|
||||
actions.release(NavigationAction::SetLinearVelocity);
|
||||
actions.release(NavigationAction::Translate);
|
||||
actions.action_data_mut(NavigationAction::Move).axis_pair = None;
|
||||
actions.action_data_mut(NavigationAction::Move).axis_pair =
|
||||
Some(DualAxisData::from_xy(Vec2::ZERO));
|
||||
}
|
||||
if actions.pressed(NavigationAction::SetLinearVelocity) {
|
||||
if let Some(pair) = actions.axis_pair(NavigationAction::SetLinearVelocity) {
|
||||
|
@ -232,7 +233,7 @@ fn controls(
|
|||
velocity.linvel = Vec2::ZERO;
|
||||
actions
|
||||
.action_data_mut(NavigationAction::SetLinearVelocity)
|
||||
.axis_pair = None;
|
||||
.axis_pair = Some(DualAxisData::from_xy(Vec2::ZERO));
|
||||
}
|
||||
if actions.pressed(NavigationAction::Translate) {
|
||||
if let Some(pair) = actions.axis_pair(NavigationAction::Translate) {
|
||||
|
@ -246,7 +247,7 @@ fn controls(
|
|||
}
|
||||
actions
|
||||
.action_data_mut(NavigationAction::Translate)
|
||||
.axis_pair = None;
|
||||
.axis_pair = Some(DualAxisData::from_xy(Vec2::ZERO));
|
||||
}
|
||||
if !snap_timers.contains_key(&entity) {
|
||||
if let Some(rotation_speed) = rotation_speed {
|
||||
|
|
Loading…
Reference in New Issue
Block a user