fix bug
This commit is contained in:
parent
ba3e8ad16d
commit
e516654be1
@ -25,6 +25,7 @@ function GMToolUI:onRefresh()
|
|||||||
local scrollView = self.uiMap['gm_tool_ui.ScrollView']
|
local scrollView = self.uiMap['gm_tool_ui.ScrollView']
|
||||||
local textTip = self.uiMap['gm_tool_ui.text_tip']
|
local textTip = self.uiMap['gm_tool_ui.text_tip']
|
||||||
local speedUpBtn = self.uiMap["gm_tool_ui.speed_up_btn"]
|
local speedUpBtn = self.uiMap["gm_tool_ui.speed_up_btn"]
|
||||||
|
local speedUpBtn = self.uiMap["gm_tool_ui.speed_up_btn"]
|
||||||
local skipTutorialTx = self.uiMap["gm_tool_ui.skip_tutoria.text"]
|
local skipTutorialTx = self.uiMap["gm_tool_ui.skip_tutoria.text"]
|
||||||
local skipTutorialBtn = self.uiMap["gm_tool_ui.skip_tutoria"]
|
local skipTutorialBtn = self.uiMap["gm_tool_ui.skip_tutoria"]
|
||||||
local skipTutorialCheck = self.uiMap["gm_tool_ui.skip_tutoria.check"]
|
local skipTutorialCheck = self.uiMap["gm_tool_ui.skip_tutoria.check"]
|
||||||
@ -53,6 +54,11 @@ function GMToolUI:onRefresh()
|
|||||||
self.inputField:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_INPUT_FIELD).text = ""
|
self.inputField:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_INPUT_FIELD).text = ""
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
self.uiMap["gm_tool_ui.exit_btn.text"]:setText("退到登录界面", self.uiMap["gm_tool_ui.exit_btn.text"]:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT))
|
||||||
|
self.uiMap["gm_tool_ui.exit_btn"]:addClickListener(function()
|
||||||
|
ModuleManager.LoginManager:goToLoginScene()
|
||||||
|
end)
|
||||||
|
|
||||||
speedUpBtn:addClickListener(function()
|
speedUpBtn:addClickListener(function()
|
||||||
local timeScale = CS.UnityEngine.Time.timeScale
|
local timeScale = CS.UnityEngine.Time.timeScale
|
||||||
if timeScale == 1 then
|
if timeScale == 1 then
|
||||||
|
|||||||
@ -209,12 +209,16 @@ function HeroInfoComp:refresh(checkLevel)
|
|||||||
self.spineObjLv:setVisible(canLvUp)
|
self.spineObjLv:setVisible(canLvUp)
|
||||||
if canLvUp then
|
if canLvUp then
|
||||||
self.btnUp:setSprite(GConst.ATLAS_PATH.COMMON, BTN_ICON[1])
|
self.btnUp:setSprite(GConst.ATLAS_PATH.COMMON, BTN_ICON[1])
|
||||||
|
self.btnUp5:setSprite(GConst.ATLAS_PATH.COMMON, BTN_ICON[1])
|
||||||
self.spineObjLv:playAnim("animation", true, false)
|
self.spineObjLv:playAnim("animation", true, false)
|
||||||
else
|
else
|
||||||
self.btnUp:setSprite(GConst.ATLAS_PATH.COMMON, BTN_ICON[2])
|
self.btnUp:setSprite(GConst.ATLAS_PATH.COMMON, BTN_ICON[2])
|
||||||
|
self.btnUp5:setSprite(GConst.ATLAS_PATH.COMMON, BTN_ICON[2])
|
||||||
end
|
end
|
||||||
self.btnUp:setTouchEnable(true)
|
self.btnUp:setTouchEnable(true)
|
||||||
self.btnUp:setActive(not self.heroEntity:isMaxLv())
|
self.btnUp:setActive(not self.heroEntity:isMaxLv())
|
||||||
|
self.btnUp5:setTouchEnable(true)
|
||||||
|
self.btnUp5:setActive(not self.heroEntity:isMaxLv())
|
||||||
|
|
||||||
if isLvChange then
|
if isLvChange then
|
||||||
self.spineObj:setVisible(true)
|
self.spineObj:setVisible(true)
|
||||||
|
|||||||
@ -289,10 +289,10 @@ function HeroEntity:canLvUp(showToast)
|
|||||||
if not GFunc.checkCost(self:getFragmentId(), fragmentCost, showToast) then
|
if not GFunc.checkCost(self:getFragmentId(), fragmentCost, showToast) then
|
||||||
return false, GConst.HeroConst.CHECK_LV_UP_STATE.FRAGMENT_NOT_ENOUGH
|
return false, GConst.HeroConst.CHECK_LV_UP_STATE.FRAGMENT_NOT_ENOUGH
|
||||||
end
|
end
|
||||||
-- local goldCost = cost[2] or 0
|
local goldCost = cost[2] or 0
|
||||||
-- if not GFunc.checkCost(GConst.ItemConst.ITEM_ID_GOLD, goldCost, showToast) then
|
if not GFunc.checkCost(self:getLvUpCostId(), goldCost, showToast) then
|
||||||
-- return false, GConst.HeroConst.CHECK_LV_UP_STATE.COIN_NOT_ENOUGH
|
return false, GConst.HeroConst.CHECK_LV_UP_STATE.COIN_NOT_ENOUGH
|
||||||
-- end
|
end
|
||||||
|
|
||||||
return true, GConst.HeroConst.CHECK_LV_UP_STATE.SUCCESS
|
return true, GConst.HeroConst.CHECK_LV_UP_STATE.SUCCESS
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user