battlesystem: rename menu constructor
This commit is contained in:
parent
8a09110ac8
commit
eb033c319f
1 changed files with 9 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue