scenes/battlesystem: get inputs from right source
This commit is contained in:
parent
f486d73409
commit
173efc2bab
3 changed files with 3 additions and 3 deletions
|
@ -101,7 +101,7 @@ function Cursor:update(dt)
|
||||||
if (self.frame >= 4) then
|
if (self.frame >= 4) then
|
||||||
self.frame = 1
|
self.frame = 1
|
||||||
end
|
end
|
||||||
local keys = game.input.keys
|
local keys = self.controller.keys
|
||||||
|
|
||||||
if (keys["up"].isPressed) then
|
if (keys["up"].isPressed) then
|
||||||
dy = math.max(self.y - 1, 1)
|
dy = math.max(self.y - 1, 1)
|
||||||
|
|
|
@ -50,7 +50,7 @@ end
|
||||||
|
|
||||||
function MenuSystem:update(dt)
|
function MenuSystem:update(dt)
|
||||||
if (self.isActive) then
|
if (self.isActive) then
|
||||||
local keys = game.input.keys
|
local keys = self.controller.keys
|
||||||
|
|
||||||
if self.cursor < self.view then
|
if self.cursor < self.view then
|
||||||
self.view = self.cursor
|
self.view = self.cursor
|
||||||
|
|
|
@ -74,7 +74,7 @@ function Character:update(dt)
|
||||||
end
|
end
|
||||||
|
|
||||||
elseif (self.currentAction == "selectAttack") then
|
elseif (self.currentAction == "selectAttack") then
|
||||||
if (game.input.keys["B"].isPressed) then
|
if (self.controller.keys["B"].isPressed) then
|
||||||
--self.currentAction = "selectDirection"
|
--self.currentAction = "selectDirection"
|
||||||
--self.controller.cursor:set(self.x, self.y)
|
--self.controller.cursor:set(self.x, self.y)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue