summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--logic/controller.lua8
-rw-r--r--main.lua4
2 files changed, 12 insertions, 0 deletions
diff --git a/logic/controller.lua b/logic/controller.lua
index 302d764..dc4ec40 100644
--- a/logic/controller.lua
+++ b/logic/controller.lua
@@ -107,4 +107,12 @@ function controller.mousereleased(x, y, button)
end
end
+function controller.wheelmoved(x, y)
+ if y > 0 then
+ playerChangeNextBullet("q")
+ elseif y < 0 then
+ playerChangeNextBullet("e")
+ end
+end
+
return controller
diff --git a/main.lua b/main.lua
index 7a7ecef..df44043 100644
--- a/main.lua
+++ b/main.lua
@@ -82,6 +82,10 @@ function love.mousereleased(x, y, button)
controller.mousereleased(x, y, button)
end
+function love.wheelmoved(x, y)
+ controller.wheelmoved(x, y)
+end
+
function onContact(a, b, contact)
local objectA = utils.whoseBody(a:getBody())
local objectB = utils.whoseBody(b:getBody())