diff options
author | Alexander Foremny <aforemny@posteo.de> | 2024-03-24 05:57:34 +0100 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2024-03-24 05:57:34 +0100 |
commit | 486d0a8ef1c2e79473c698bee523e9592a070c5c (patch) | |
tree | a9d63938175010523f06cabab4aeb1dd3f243831 /src/client.rs | |
parent | 9572af0b8173ada042e654dc0c7c342d58eefc92 (diff) |
feat: add stop (`s`) input
Diffstat (limited to 'src/client.rs')
-rw-r--r-- | src/client.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client.rs b/src/client.rs index fc781cc..6fe86b6 100644 --- a/src/client.rs +++ b/src/client.rs @@ -293,6 +293,7 @@ fn buffer_input( mut attack: ResMut<Attack>, cameras: Query<(&Camera, &GlobalTransform)>, client_id: Res<ClientId>, + keyboard_input: Res<ButtonInput<KeyCode>>, mouse_input: Res<ButtonInput<MouseButton>>, mut client: ClientMut, windows: Query<&Window>, @@ -344,6 +345,8 @@ fn buffer_input( } } } + } else if keyboard_input.just_pressed(KeyCode::KeyS) { + client.add_input(Inputs::Imperative(Imperative::Idle)); } else { client.add_input(Inputs::None); } |