aboutsummaryrefslogtreecommitdiff
path: root/src/input.odin
diff options
context:
space:
mode:
Diffstat (limited to 'src/input.odin')
-rw-r--r--src/input.odin16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/input.odin b/src/input.odin
index ba773a3..0cd2c91 100644
--- a/src/input.odin
+++ b/src/input.odin
@@ -5,6 +5,12 @@ import fw "fw"
actions: struct {
move_left: fw.Keybind,
move_right: fw.Keybind,
+
+ aim_left: fw.Keybind,
+ aim_right: fw.Keybind,
+ aim_up: fw.Keybind,
+ aim_down: fw.Keybind,
+
jump: fw.Keybind,
dash: fw.Keybind,
shoot: fw.Keybind,
@@ -16,9 +22,13 @@ actions: struct {
init_keybinds :: proc() {
actions.move_left.input = .A
actions.move_right.input = .D
+ actions.aim_left.input = .A
+ actions.aim_right.input = .D
+ actions.aim_up.input = .W
+ actions.aim_down.input = .S
actions.jump.input = .Space
actions.dash.input = .Left_Shift
- actions.shoot.input = fw.Mouse_Button.Left
+ actions.shoot.input = .J
actions.toggle_debug_mode.input = .T
actions.toggle_fullscreen.input = .F11
actions.exit.input = .Escape
@@ -27,6 +37,10 @@ init_keybinds :: proc() {
update_keybinds :: proc() {
fw.update_keybind(&actions.move_left)
fw.update_keybind(&actions.move_right)
+ fw.update_keybind(&actions.aim_left)
+ fw.update_keybind(&actions.aim_right)
+ fw.update_keybind(&actions.aim_up)
+ fw.update_keybind(&actions.aim_down)
fw.update_keybind(&actions.jump)
fw.update_keybind(&actions.dash)
fw.update_keybind(&actions.shoot)