挂机
This commit is contained in:
parent
0166341747
commit
f7ed30face
File diff suppressed because it is too large
Load Diff
@ -220,7 +220,7 @@ BattleConst.SPINE_ANIMATION_NAME = {
|
||||
IDLE = "idle",
|
||||
ATTACK = "attack01",
|
||||
MOVE = "move",
|
||||
HIT = "suffer",
|
||||
HIT = "suffer01",
|
||||
HIT_2 = "suffer02",
|
||||
DEAD = "death",
|
||||
BORN = "born",
|
||||
|
||||
@ -47,7 +47,6 @@ function IdleDropUI:onLoadRootComplete()
|
||||
local uiMap = self.root:genAllChildren()
|
||||
self.uiMap = uiMap
|
||||
uiMap["idle_drop_ui.bg.title_text"]:setText(I18N:getGlobalText(I18N.GlobalConst.IDLE_DROP_REWARD))
|
||||
uiMap["idle_drop_ui.bg.desc_tx_1"]:setText(I18N:getGlobalText(I18N.GlobalConst.IDLE_DROP_DESC_1))
|
||||
self.timeTx = uiMap["idle_drop_ui.bg.time_tx"]
|
||||
|
||||
local goldPerHour = GFunc.num2Str(DataManager.IdleData:getGoldPerHour())
|
||||
@ -56,7 +55,8 @@ function IdleDropUI:onLoadRootComplete()
|
||||
uiMap["idle_drop_ui.bg.bg_2.desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.PER_HOUR, expPerHour))
|
||||
|
||||
local idleMaxTime = DataManager.IdleData:getIdleMaxTime()
|
||||
uiMap["idle_drop_ui.bg.desc_tx_2"]:setText(I18N:getGlobalText(I18N.GlobalConst.IDLE_DROP_DESC_2, idleMaxTime // 3600))
|
||||
-- uiMap["idle_drop_ui.bg.desc_tx_2"]:setText(I18N:getGlobalText(I18N.GlobalConst.IDLE_DROP_DESC_2, idleMaxTime // 3600))
|
||||
uiMap["idle_drop_ui.bg.desc_tx_1"]:setText(I18N:getGlobalText(I18N.GlobalConst.IDLE_DROP_DESC_1) .. I18N:getGlobalText(I18N.GlobalConst.IDLE_DROP_DESC_2, idleMaxTime // 3600))
|
||||
self.quickBtn = uiMap["idle_drop_ui.bg.quick_btn"]
|
||||
self.quickBtn:addClickListener(function()
|
||||
ModuleManager.IdleManager:showIdleQuickDropUI()
|
||||
@ -68,7 +68,14 @@ function IdleDropUI:onLoadRootComplete()
|
||||
ModuleManager.IdleManager:getIdleRewrad()
|
||||
end)
|
||||
uiMap["idle_drop_ui.bg.get_btn.text"]:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_CLAIM))
|
||||
uiMap["idle_drop_ui.bg.close_btn"]:addClickListener(function()
|
||||
self.root:addClickListener(function()
|
||||
self:closeUI()
|
||||
end)
|
||||
|
||||
uiMap["idle_drop_ui.bg.desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.CLICK_CLOSE_DESC))
|
||||
uiMap["idle_drop_ui.bg.bg1.desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.IDLE_DROP_DESC_3))
|
||||
uiMap["idle_drop_ui.bg.bg1.desc_tx_1"]:setText(I18N:getGlobalText(I18N.GlobalConst.IDLE_DROP_DESC_3))
|
||||
uiMap["idle_drop_ui.bg.bg1"]:addClickListener(function()
|
||||
self:closeUI()
|
||||
end)
|
||||
|
||||
@ -232,19 +239,19 @@ end
|
||||
|
||||
function IdleDropUI:refreshBtns()
|
||||
if #self.itemList > 0 then
|
||||
self.getBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_green_2")
|
||||
self.getBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_yellow_1")
|
||||
self.getBtn:setTouchEnable(true)
|
||||
else
|
||||
self.getBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_grey_2")
|
||||
self.getBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_grey_1")
|
||||
self.getBtn:setTouchEnable(false)
|
||||
end
|
||||
local quickTimes = DataManager.IdleData:getQuickIdleRemainTimes()
|
||||
if quickTimes > 0 then
|
||||
self.quickBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_yellow_2")
|
||||
self.quickBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_blue_1")
|
||||
self.quickBtn:setTouchEnable(true)
|
||||
self:addQuickBtnRedPoint()
|
||||
else
|
||||
self.quickBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_grey_2")
|
||||
self.quickBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_grey_1")
|
||||
self.quickBtn:setTouchEnable(false)
|
||||
self:removeQuickBtnRedPoint()
|
||||
end
|
||||
@ -281,7 +288,7 @@ function IdleDropUI:addGetBtnRedPoint()
|
||||
return
|
||||
end
|
||||
self.getBtnRedPoint = true
|
||||
self.getBtn:addRedPoint(121, 42, 0.8)
|
||||
self.getBtn:addRedPoint(70, 30, 0.5)
|
||||
end
|
||||
|
||||
function IdleDropUI:removeGetBtnRedPoint()
|
||||
@ -297,7 +304,7 @@ function IdleDropUI:addQuickBtnRedPoint()
|
||||
return
|
||||
end
|
||||
self.quickBtnRedPoint = true
|
||||
self.quickBtn:addRedPoint(121, 42, 0.8)
|
||||
self.quickBtn:addRedPoint(90, 30, 0.5)
|
||||
end
|
||||
|
||||
function IdleDropUI:removeQuickBtnRedPoint()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user