summaryrefslogtreecommitdiffhomepage
path: root/controller.lua
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2016-05-27 17:43:34 +0200
committerAki <nthirtyone@gmail.com>2016-05-27 17:43:34 +0200
commitf9d6f8e3a41835671da69f20702c0313bda96fe0 (patch)
tree3726d0da5be1c0d7a974a2ae9f4a17d5ece95e74 /controller.lua
parent50fc48bf4e1de8382513da390eeece796f18926e (diff)
downloadroflnauts-f9d6f8e3a41835671da69f20702c0313bda96fe0.zip
roflnauts-f9d6f8e3a41835671da69f20702c0313bda96fe0.tar.gz
roflnauts-f9d6f8e3a41835671da69f20702c0313bda96fe0.tar.bz2
Controller
Diffstat (limited to 'controller.lua')
-rw-r--r--controller.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/controller.lua b/controller.lua
index d00f434..d6dcb6d 100644
--- a/controller.lua
+++ b/controller.lua
@@ -62,7 +62,7 @@ function Controller:keypressed(key, scancode)
if self.parent ~= nil and self.joystick == nil then
local control = self:testControl(key)
if control ~= nil then
- self.parent:controllerPressed(control)
+ self.parent:controllerPressed(control, self)
end
end
end
@@ -71,7 +71,7 @@ function Controller:keyreleased(key, scancode)
if self.parent ~= nil and self.joystick == nil then
local control = self:testControl(key)
if control ~= nil then
- self.parent:controllerReleased(control)
+ self.parent:controllerReleased(control, self)
end
end
end
@@ -80,6 +80,6 @@ function Controller:isDown(control)
if self.joystick == nil then
return love.keyboard.isDown(self[control])
else
- return self.joystick:isGamepadDown(self[control])
+ return self.joystick:isGamepadDown(self[control], self)
end
end \ No newline at end of file