Skip to content

Commit 5e94aba

Browse files
committed
add more control options
1 parent 96e7616 commit 5e94aba

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/game/spawn/clock.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ fn record_clock_controller(
135135
mut controller_query: Query<&mut ClockController>,
136136
) {
137137
for mut controller in &mut controller_query {
138-
if input.pressed(KeyCode::KeyS) {
138+
if input.pressed(KeyCode::KeyS) || input.pressed(KeyCode::ArrowDown) {
139139
if controller.setting {
140140
controller.time_setting += time.delta_seconds();
141141
} else {
@@ -147,7 +147,7 @@ fn record_clock_controller(
147147
controller.time_setting = 0.0;
148148
}
149149

150-
if input.pressed(KeyCode::KeyW) {
150+
if input.pressed(KeyCode::KeyW) || input.pressed(KeyCode::ArrowUp) {
151151
if controller.winding {
152152
controller.time_winding += time.delta_seconds();
153153
} else {

src/game/spawn/player.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,14 @@ fn oil_drink(
4848
if controller.held_clock.is_some() {
4949
return;
5050
}
51-
if controller.index != 6 || !input.pressed(KeyCode::Space) {
51+
52+
let drink = input.pressed(KeyCode::Space)
53+
|| input.pressed(KeyCode::KeyW)
54+
|| input.pressed(KeyCode::KeyS)
55+
|| input.pressed(KeyCode::ArrowUp)
56+
|| input.pressed(KeyCode::ArrowDown);
57+
58+
if controller.index != 6 || !drink {
5259
commands.trigger(StopLoopingSfx::Key(SfxKey::OilDrink));
5360
return;
5461
}

0 commit comments

Comments
 (0)