summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2017-04-06 20:03:17 +0200
committerAki <nthirtyone@gmail.com>2017-04-06 20:03:17 +0200
commit33b3a93138a9eee40727e9f56373b434ceab1cef (patch)
tree1739a49c426fe8d5861af1b2364c6d6d5815e0a3
parenta013d70115171764ce0941fbbe18a5447447a7eb (diff)
downloadroflnauts-33b3a93138a9eee40727e9f56373b434ceab1cef.zip
roflnauts-33b3a93138a9eee40727e9f56373b434ceab1cef.tar.gz
roflnauts-33b3a93138a9eee40727e9f56373b434ceab1cef.tar.bz2
Controller moved to /not/ and cleaned-up a bit.
-rw-r--r--main.lua2
-rw-r--r--not/Controller.lua (renamed from controller.lua)14
2 files changed, 7 insertions, 9 deletions
diff --git a/main.lua b/main.lua
index 7e1232e..b905de6 100644
--- a/main.lua
+++ b/main.lua
@@ -27,7 +27,7 @@ end
require "not.World"
require "camera"
require "not.Menu"
-require "controller"
+require "not.Controller"
require "not.Settings"
-- Temporary debug
diff --git a/controller.lua b/not/Controller.lua
index f035162..8a2a863 100644
--- a/controller.lua
+++ b/not/Controller.lua
@@ -1,14 +1,12 @@
--- `Controller`
+--- `Controller`
-- Module to manage player input.
-- It uses `love.keypressed`, `love.keyreleased`, `love.gamepadreleased`, `love.gamepadpressed`, `love.joystickadded`, so be sure not to use them by yourself.
-- Rather than that use functions provided by this module: `Controller.controlpressed` and `Controller.controlreleased`.
--- For information on additional functions, look below.
-
--- Namespace
-Controller = {}
-Controller.sets = {}
-Controller.axes = {}
-Controller.deadzone = .3
+Controller = {
+ sets = {},
+ axes = {},
+ deadzone = .3
+}
-- Declared to avoid calling nil. Be sure to define yours after this line is performed.
function Controller.controlpressed(set, action, key) end