挂机
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",
|
IDLE = "idle",
|
||||||
ATTACK = "attack01",
|
ATTACK = "attack01",
|
||||||
MOVE = "move",
|
MOVE = "move",
|
||||||
HIT = "suffer",
|
HIT = "suffer01",
|
||||||
HIT_2 = "suffer02",
|
HIT_2 = "suffer02",
|
||||||
DEAD = "death",
|
DEAD = "death",
|
||||||
BORN = "born",
|
BORN = "born",
|
||||||
|
|||||||
@ -47,7 +47,6 @@ function IdleDropUI:onLoadRootComplete()
|
|||||||
local uiMap = self.root:genAllChildren()
|
local uiMap = self.root:genAllChildren()
|
||||||
self.uiMap = uiMap
|
self.uiMap = uiMap
|
||||||
uiMap["idle_drop_ui.bg.title_text"]:setText(I18N:getGlobalText(I18N.GlobalConst.IDLE_DROP_REWARD))
|
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"]
|
self.timeTx = uiMap["idle_drop_ui.bg.time_tx"]
|
||||||
|
|
||||||
local goldPerHour = GFunc.num2Str(DataManager.IdleData:getGoldPerHour())
|
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))
|
uiMap["idle_drop_ui.bg.bg_2.desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.PER_HOUR, expPerHour))
|
||||||
|
|
||||||
local idleMaxTime = DataManager.IdleData:getIdleMaxTime()
|
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 = uiMap["idle_drop_ui.bg.quick_btn"]
|
||||||
self.quickBtn:addClickListener(function()
|
self.quickBtn:addClickListener(function()
|
||||||
ModuleManager.IdleManager:showIdleQuickDropUI()
|
ModuleManager.IdleManager:showIdleQuickDropUI()
|
||||||
@ -68,7 +68,14 @@ function IdleDropUI:onLoadRootComplete()
|
|||||||
ModuleManager.IdleManager:getIdleRewrad()
|
ModuleManager.IdleManager:getIdleRewrad()
|
||||||
end)
|
end)
|
||||||
uiMap["idle_drop_ui.bg.get_btn.text"]:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_CLAIM))
|
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()
|
self:closeUI()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@ -232,19 +239,19 @@ end
|
|||||||
|
|
||||||
function IdleDropUI:refreshBtns()
|
function IdleDropUI:refreshBtns()
|
||||||
if #self.itemList > 0 then
|
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)
|
self.getBtn:setTouchEnable(true)
|
||||||
else
|
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)
|
self.getBtn:setTouchEnable(false)
|
||||||
end
|
end
|
||||||
local quickTimes = DataManager.IdleData:getQuickIdleRemainTimes()
|
local quickTimes = DataManager.IdleData:getQuickIdleRemainTimes()
|
||||||
if quickTimes > 0 then
|
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.quickBtn:setTouchEnable(true)
|
||||||
self:addQuickBtnRedPoint()
|
self:addQuickBtnRedPoint()
|
||||||
else
|
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.quickBtn:setTouchEnable(false)
|
||||||
self:removeQuickBtnRedPoint()
|
self:removeQuickBtnRedPoint()
|
||||||
end
|
end
|
||||||
@ -281,7 +288,7 @@ function IdleDropUI:addGetBtnRedPoint()
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
self.getBtnRedPoint = true
|
self.getBtnRedPoint = true
|
||||||
self.getBtn:addRedPoint(121, 42, 0.8)
|
self.getBtn:addRedPoint(70, 30, 0.5)
|
||||||
end
|
end
|
||||||
|
|
||||||
function IdleDropUI:removeGetBtnRedPoint()
|
function IdleDropUI:removeGetBtnRedPoint()
|
||||||
@ -297,7 +304,7 @@ function IdleDropUI:addQuickBtnRedPoint()
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
self.quickBtnRedPoint = true
|
self.quickBtnRedPoint = true
|
||||||
self.quickBtn:addRedPoint(121, 42, 0.8)
|
self.quickBtn:addRedPoint(90, 30, 0.5)
|
||||||
end
|
end
|
||||||
|
|
||||||
function IdleDropUI:removeQuickBtnRedPoint()
|
function IdleDropUI:removeQuickBtnRedPoint()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user