From 173efc2bab0c4055eab2f82be59afe71f58ab27f Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sat, 23 Mar 2019 11:45:20 +0100 Subject: [PATCH] scenes/battlesystem: get inputs from right source --- sonic-radiance.love/scenes/battlesystem/controller/cursor.lua | 2 +- sonic-radiance.love/scenes/battlesystem/controller/menu.lua | 2 +- sonic-radiance.love/scenes/battlesystem/entities/character.lua | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sonic-radiance.love/scenes/battlesystem/controller/cursor.lua b/sonic-radiance.love/scenes/battlesystem/controller/cursor.lua index 23d8978..aa656fb 100644 --- a/sonic-radiance.love/scenes/battlesystem/controller/cursor.lua +++ b/sonic-radiance.love/scenes/battlesystem/controller/cursor.lua @@ -101,7 +101,7 @@ function Cursor:update(dt) if (self.frame >= 4) then self.frame = 1 end - local keys = game.input.keys + local keys = self.controller.keys if (keys["up"].isPressed) then dy = math.max(self.y - 1, 1) diff --git a/sonic-radiance.love/scenes/battlesystem/controller/menu.lua b/sonic-radiance.love/scenes/battlesystem/controller/menu.lua index b3e9d9d..54d1081 100644 --- a/sonic-radiance.love/scenes/battlesystem/controller/menu.lua +++ b/sonic-radiance.love/scenes/battlesystem/controller/menu.lua @@ -50,7 +50,7 @@ end function MenuSystem:update(dt) if (self.isActive) then - local keys = game.input.keys + local keys = self.controller.keys if self.cursor < self.view then self.view = self.cursor diff --git a/sonic-radiance.love/scenes/battlesystem/entities/character.lua b/sonic-radiance.love/scenes/battlesystem/entities/character.lua index e157209..541f0df 100644 --- a/sonic-radiance.love/scenes/battlesystem/entities/character.lua +++ b/sonic-radiance.love/scenes/battlesystem/entities/character.lua @@ -74,7 +74,7 @@ function Character:update(dt) end elseif (self.currentAction == "selectAttack") then - if (game.input.keys["B"].isPressed) then + if (self.controller.keys["B"].isPressed) then --self.currentAction = "selectDirection" --self.controller.cursor:set(self.x, self.y) end