diff options
Diffstat (limited to 'src/input.odin')
| -rw-r--r-- | src/input.odin | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/input.odin b/src/input.odin index 0dad408..6c02349 100644 --- a/src/input.odin +++ b/src/input.odin @@ -14,10 +14,9 @@ Keybind :: struct { } Input :: struct { - move_up: Keybind, move_left: Keybind, - move_down: Keybind, move_right: Keybind, + jump: Keybind, key_down: [sapp.MAX_KEYCODES]bool, key_just_down: [sapp.MAX_KEYCODES]bool, @@ -26,10 +25,9 @@ Input :: struct { } init_keybinds :: proc(input: ^Input) { - input.move_up.input = sapp.Keycode.W input.move_left.input = sapp.Keycode.A - input.move_down.input = sapp.Keycode.S input.move_right.input = sapp.Keycode.D + input.jump.input = sapp.Keycode.SPACE } input_event :: proc(event: ^sapp.Event, input: ^Input) { |
