summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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