mirror of
https://github.com/TangentFoxy/baton.git
synced 2025-07-28 02:52:19 +00:00
initialize player
This commit is contained in:
18
main.lua
Normal file
18
main.lua
Normal file
@@ -0,0 +1,18 @@
|
||||
local baton = require 'baton'
|
||||
local inspect = require 'inspect'
|
||||
|
||||
local input = baton.new {
|
||||
controls = {
|
||||
left = {'key:left', 'axis:leftx-', 'button:dpleft'},
|
||||
right = {'key:right', 'axis:leftx+', 'button:dpright'},
|
||||
up = {'key:up', 'axis:lefty-', 'button:dpup'},
|
||||
down = {'key:down', 'axis:lefty+', 'button:dpdown'},
|
||||
action = {'key:x', 'button:a'},
|
||||
},
|
||||
pairs = {
|
||||
move = {'left', 'right', 'up', 'down'}
|
||||
},
|
||||
joystick = love.joystick.getJoysticks()[1],
|
||||
}
|
||||
|
||||
print(inspect(input))
|
Reference in New Issue
Block a user