From eb033c319fe22176ad02d56838a59a64df1960e3 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sun, 31 Mar 2019 12:05:17 +0200 Subject: [PATCH] battlesystem: rename menu constructor --- .../scenes/battlesystem/controller/menu.lua | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sonic-radiance.love/scenes/battlesystem/controller/menu.lua b/sonic-radiance.love/scenes/battlesystem/controller/menu.lua index 54d1081..5cd4d68 100644 --- a/sonic-radiance.love/scenes/battlesystem/controller/menu.lua +++ b/sonic-radiance.love/scenes/battlesystem/controller/menu.lua @@ -1,9 +1,9 @@ -local MenuSystem = Object:extend() +local MenuConstructor = Object:extend() local BaseMenu = {"attack", "techs", "object", "defend", "flee", "back"} local MENUPOS_X1, MENUPOS_X2, MENUPOS_Y = 32, 32, 110 -function MenuSystem:new( controller ) +function MenuConstructor:new( controller ) self.controller = controller self.isActive = false self.techList = {} @@ -19,7 +19,7 @@ function MenuSystem:new( controller ) self.view = 1 end -function MenuSystem:set(currentCharacter) +function MenuConstructor:set(currentCharacter) self.isActive = true self.cursor = 1 self.cursorTransition = 0 @@ -32,7 +32,7 @@ function MenuSystem:set(currentCharacter) end -function MenuSystem:getSkillList() +function MenuConstructor:getSkillList() local list = game.characters:getSkillList(self.character.charid) local skillmenu = {} for k,v in pairs(list) do @@ -44,11 +44,11 @@ function MenuSystem:getSkillList() return skillmenu end -function MenuSystem:unset( ) +function MenuConstructor:unset( ) self.isActive = false end -function MenuSystem:update(dt) +function MenuConstructor:update(dt) if (self.isActive) then local keys = self.controller.keys @@ -117,7 +117,7 @@ function MenuSystem:update(dt) end end -function MenuSystem:sendSignal(menu, id) +function MenuConstructor:sendSignal(menu, id) --print(self.menu[menu][id]) self.isActive = false if (menu == 1) then @@ -127,7 +127,7 @@ function MenuSystem:sendSignal(menu, id) end end -function MenuSystem:draw() +function MenuConstructor:draw() if (self.isActive) then local x, y, addition x = 32 @@ -157,4 +157,4 @@ function MenuSystem:draw() end end -return MenuSystem +return MenuConstructor