diff options
author | Aki <nthirtyone@gmail.com> | 2016-08-15 01:55:58 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2016-08-15 01:55:58 +0200 |
commit | 6c391f1c9772d19c93a7d6148e09cef0de108304 (patch) | |
tree | 7e7cc502f60c6f1fc6e1b22178e1301ba05bb4ab | |
parent | 39a93ec28fc375bbcec3599b9017bd26670faa85 (diff) | |
download | roflnauts-6c391f1c9772d19c93a7d6148e09cef0de108304.zip roflnauts-6c391f1c9772d19c93a7d6148e09cef0de108304.tar.gz roflnauts-6c391f1c9772d19c93a7d6148e09cef0de108304.tar.bz2 |
oops forgot gamepad
-rw-r--r-- | controller.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/controller.lua b/controller.lua index 1ef3a1a..982e5c7 100644 --- a/controller.lua +++ b/controller.lua @@ -56,13 +56,14 @@ function Controller.testControl(set, key, joystick) end end end ---love.keyboard.isDown(set[action]) ---set.joystick:isGamepadDown(set[action]) + -- Checks if given action of given set is down function Controller.isDown(set, action) if set ~= nil then if set.joystick == nil then return love.keyboard.isDown(set[action]) + else + return set.joystick:isGamepadDown(set[action]) end end end |