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 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 skipTutorialTx = self.uiMap["gm_tool_ui.skip_tutoria.text"]
|
||||
local skipTutorialBtn = self.uiMap["gm_tool_ui.skip_tutoria"]
|
||||
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 = ""
|
||||
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()
|
||||
local timeScale = CS.UnityEngine.Time.timeScale
|
||||
if timeScale == 1 then
|
||||
|
||||
@ -209,12 +209,16 @@ function HeroInfoComp:refresh(checkLevel)
|
||||
self.spineObjLv:setVisible(canLvUp)
|
||||
if canLvUp then
|
||||
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)
|
||||
else
|
||||
self.btnUp:setSprite(GConst.ATLAS_PATH.COMMON, BTN_ICON[2])
|
||||
self.btnUp5:setSprite(GConst.ATLAS_PATH.COMMON, BTN_ICON[2])
|
||||
end
|
||||
self.btnUp:setTouchEnable(true)
|
||||
self.btnUp:setActive(not self.heroEntity:isMaxLv())
|
||||
self.btnUp5:setTouchEnable(true)
|
||||
self.btnUp5:setActive(not self.heroEntity:isMaxLv())
|
||||
|
||||
if isLvChange then
|
||||
self.spineObj:setVisible(true)
|
||||
|
||||
@ -289,10 +289,10 @@ function HeroEntity:canLvUp(showToast)
|
||||
if not GFunc.checkCost(self:getFragmentId(), fragmentCost, showToast) then
|
||||
return false, GConst.HeroConst.CHECK_LV_UP_STATE.FRAGMENT_NOT_ENOUGH
|
||||
end
|
||||
-- local goldCost = cost[2] or 0
|
||||
-- if not GFunc.checkCost(GConst.ItemConst.ITEM_ID_GOLD, goldCost, showToast) then
|
||||
-- return false, GConst.HeroConst.CHECK_LV_UP_STATE.COIN_NOT_ENOUGH
|
||||
-- end
|
||||
local goldCost = cost[2] or 0
|
||||
if not GFunc.checkCost(self:getLvUpCostId(), goldCost, showToast) then
|
||||
return false, GConst.HeroConst.CHECK_LV_UP_STATE.COIN_NOT_ENOUGH
|
||||
end
|
||||
|
||||
return true, GConst.HeroConst.CHECK_LV_UP_STATE.SUCCESS
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user