blob: ba773a327e68fe54e1a841b03755ccb64d72e110 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
package demonchime
import fw "fw"
actions: struct {
move_left: fw.Keybind,
move_right: fw.Keybind,
jump: fw.Keybind,
dash: fw.Keybind,
shoot: fw.Keybind,
toggle_debug_mode: fw.Keybind,
toggle_fullscreen: fw.Keybind,
exit: fw.Keybind,
}
init_keybinds :: proc() {
actions.move_left.input = .A
actions.move_right.input = .D
actions.jump.input = .Space
actions.dash.input = .Left_Shift
actions.shoot.input = fw.Mouse_Button.Left
actions.toggle_debug_mode.input = .T
actions.toggle_fullscreen.input = .F11
actions.exit.input = .Escape
}
update_keybinds :: proc() {
fw.update_keybind(&actions.move_left)
fw.update_keybind(&actions.move_right)
fw.update_keybind(&actions.jump)
fw.update_keybind(&actions.dash)
fw.update_keybind(&actions.shoot)
fw.update_keybind(&actions.toggle_debug_mode)
fw.update_keybind(&actions.toggle_fullscreen)
fw.update_keybind(&actions.exit)
}
|