2023-03-26 23:28:26 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
# Set the default input / key bindings here
|
|
|
|
module Input
|
|
|
|
class << self
|
|
|
|
PRIMARY_KEYS = [:j, :z, :space]
|
|
|
|
SECONDARY_KEYS = [:k, :x, :backspace]
|
2023-08-01 03:13:29 +00:00
|
|
|
PAUSE_KEYS = [:escape]
|
2023-03-26 23:28:26 +00:00
|
|
|
BINDINGS = {
|
|
|
|
primary: {
|
|
|
|
keyboard: %i[j z space],
|
|
|
|
controller_one: %i[a]
|
|
|
|
},
|
|
|
|
secondary: {
|
|
|
|
keyboard: %i[k x backspace],
|
|
|
|
controller_one: %i[b]
|
|
|
|
},
|
|
|
|
pause: {
|
2023-08-01 03:13:29 +00:00
|
|
|
keyboard: %i[escape],
|
2023-03-26 23:28:26 +00:00
|
|
|
controller_one: %i[start]
|
|
|
|
},
|
|
|
|
rotate_left: {
|
|
|
|
keyboard: %i[q j z space],
|
|
|
|
controller_one: %i[a l1]
|
|
|
|
},
|
|
|
|
rotate_right: {
|
|
|
|
keyboard: %i[e x backspace],
|
|
|
|
controller_one: %i[b l2]
|
|
|
|
},
|
|
|
|
up: {
|
|
|
|
keyboard: %i[w up],
|
|
|
|
controller_one: %i[up]
|
|
|
|
},
|
|
|
|
down: {
|
|
|
|
keyboard: %i[s down],
|
|
|
|
controller_one: %i[down]
|
|
|
|
},
|
|
|
|
left: {
|
|
|
|
keyboard: %i[a left],
|
|
|
|
controller_one: %i[left]
|
|
|
|
},
|
|
|
|
right: {
|
|
|
|
keyboard: %i[d right],
|
|
|
|
controller_one: %i[right]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|