Merge branch 'dev' of http://git.juzugame.com/b6-client/b6-lua into dev
This commit is contained in:
commit
6b3734e703
@ -72,9 +72,8 @@ function GameSettingUI:initLoginBtn()
|
|||||||
end)
|
end)
|
||||||
self.uiMap["game_setting_ui.bg.google_switch_btn.desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.CHANGE_ACCOUNT_DESC))
|
self.uiMap["game_setting_ui.bg.google_switch_btn.desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.CHANGE_ACCOUNT_DESC))
|
||||||
|
|
||||||
local deleteTx = self.uiMap["game_setting_ui.bg.delete_tx"]
|
local deleteBtn = self.uiMap["game_setting_ui.bg.delete_btn"]
|
||||||
deleteTx:setText(I18N:getGlobalText(I18N.GlobalConst.DELETE_ACCOUNT_DESC))
|
deleteBtn:addClickListener(function()
|
||||||
deleteTx:addClickListener(function()
|
|
||||||
ModuleManager.AccountManager:showDeleteUI()
|
ModuleManager.AccountManager:showDeleteUI()
|
||||||
end)
|
end)
|
||||||
self:refreshAccountInfo()
|
self:refreshAccountInfo()
|
||||||
|
|||||||
@ -24,7 +24,13 @@ function BottomBtnCell:refresh(desc, selected, showAni)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function BottomBtnCell:addClickListener(func)
|
function BottomBtnCell:addClickListener(func)
|
||||||
self:getBaseObject():addClickListener(func, GConst.CLICK_SOUND.NORMAL)
|
self:getBaseObject():addClickListener(function()
|
||||||
|
local audioPath = AudioManager.CLICK_ID[GConst.CLICK_SOUND.NORMAL]
|
||||||
|
if audioPath then
|
||||||
|
AudioManager:playEffect(audioPath)
|
||||||
|
end
|
||||||
|
func()
|
||||||
|
end, GConst.CLICK_SOUND.NONE)
|
||||||
end
|
end
|
||||||
|
|
||||||
function BottomBtnCell:getCurLocalPosX()
|
function BottomBtnCell:getCurLocalPosX()
|
||||||
|
|||||||
@ -17,8 +17,4 @@ function SideBarFirstRechargeCell:onClick()
|
|||||||
ModuleManager.ShopManager:showGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, GConst.ShopConst.FIRST_RECHARGE_ID, true)
|
ModuleManager.ShopManager:showGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, GConst.ShopConst.FIRST_RECHARGE_ID, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
function SideBarFirstRechargeCell:getIsShowRedPoint()
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
return SideBarFirstRechargeCell
|
return SideBarFirstRechargeCell
|
||||||
@ -9,6 +9,7 @@ local QLT_DELAY_TIME = {
|
|||||||
[4] = 0.5, -- 紫
|
[4] = 0.5, -- 紫
|
||||||
[5] = 0.5, -- 预留
|
[5] = 0.5, -- 预留
|
||||||
}
|
}
|
||||||
|
local FIRST_DELAY_TIME = 0
|
||||||
local FADE_TIME = 0.5
|
local FADE_TIME = 0.5
|
||||||
local MAX_SCREEN_CELL_COUNT = 12 -- 同屏界面能展示的最大数量
|
local MAX_SCREEN_CELL_COUNT = 12 -- 同屏界面能展示的最大数量
|
||||||
|
|
||||||
@ -22,6 +23,8 @@ function BoxRewardUI:ctor(params)
|
|||||||
-- self.turnIdx = MAX_SCREEN_CELL_COUNT // CELL_NUM
|
-- self.turnIdx = MAX_SCREEN_CELL_COUNT // CELL_NUM
|
||||||
-- self.maxIdx = math.ceil(#self.params.rewards / CELL_NUM)
|
-- self.maxIdx = math.ceil(#self.params.rewards / CELL_NUM)
|
||||||
-- end
|
-- end
|
||||||
|
|
||||||
|
-- 将超过界面展示范围外的cell默认打开
|
||||||
if #self.params.rewards > MAX_SCREEN_CELL_COUNT then
|
if #self.params.rewards > MAX_SCREEN_CELL_COUNT then
|
||||||
for i = MAX_SCREEN_CELL_COUNT + 1, #self.params.rewards do
|
for i = MAX_SCREEN_CELL_COUNT + 1, #self.params.rewards do
|
||||||
self.actionStatus[i] = true
|
self.actionStatus[i] = true
|
||||||
@ -105,7 +108,12 @@ function BoxRewardUI:playCellAction(cell, idx)
|
|||||||
if self.actionStatus[idx] then
|
if self.actionStatus[idx] then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local delayTime = self:getCellDelayTime(idx)
|
|
||||||
|
local delayTime = FIRST_DELAY_TIME
|
||||||
|
if idx > 1 then
|
||||||
|
delayTime = self:getCellDelayTime(idx - 1)
|
||||||
|
end
|
||||||
|
|
||||||
local canvasGroup = cell.baseObject:getComponent(GConst.TYPEOF_UNITY_CLASS.CANVAS_GROUP)
|
local canvasGroup = cell.baseObject:getComponent(GConst.TYPEOF_UNITY_CLASS.CANVAS_GROUP)
|
||||||
if not canvasGroup then
|
if not canvasGroup then
|
||||||
canvasGroup = cell.baseObject:addComponent(GConst.TYPEOF_UNITY_CLASS.CANVAS_GROUP)
|
canvasGroup = cell.baseObject:addComponent(GConst.TYPEOF_UNITY_CLASS.CANVAS_GROUP)
|
||||||
@ -113,8 +121,8 @@ function BoxRewardUI:playCellAction(cell, idx)
|
|||||||
canvasGroup.alpha = 0
|
canvasGroup.alpha = 0
|
||||||
|
|
||||||
local seq = cell.baseObject:createBindTweenSequence()
|
local seq = cell.baseObject:createBindTweenSequence()
|
||||||
seq:AppendInterval(delayTime)
|
|
||||||
local tween = canvasGroup:DOFade(1, FADE_TIME)
|
local tween = canvasGroup:DOFade(1, FADE_TIME)
|
||||||
|
seq:AppendInterval(delayTime)
|
||||||
tween:SetEase(CS.DG.Tweening.Ease.InOutSine)
|
tween:SetEase(CS.DG.Tweening.Ease.InOutSine)
|
||||||
seq:Append(tween)
|
seq:Append(tween)
|
||||||
seq:AppendCallback(function()
|
seq:AppendCallback(function()
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
local BoxSellCell = class("BoxSellCell", BaseCell)
|
local BoxSellCell = class("BoxSellCell", BaseCell)
|
||||||
|
|
||||||
local BASE_CELL_HEIGHT = 508
|
local BASE_CELL_HEIGHT = 522
|
||||||
local FULL_CELL_HEIGHT = 754
|
local FULL_CELL_HEIGHT = 786
|
||||||
local HEIGHT_ADD = 30
|
local HEIGHT_ADD = 30
|
||||||
|
|
||||||
function BoxSellCell:init()
|
function BoxSellCell:init()
|
||||||
@ -11,14 +11,14 @@ function BoxSellCell:init()
|
|||||||
boxNameTx1:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_1)) -- 普通宝箱
|
boxNameTx1:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_1)) -- 普通宝箱
|
||||||
local boxDescTx1 = uiMap["box_sell_cell.bg.box_1.desc_tx"]
|
local boxDescTx1 = uiMap["box_sell_cell.bg.box_1.desc_tx"]
|
||||||
boxDescTx1:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_24)) -- 必出<color=#5fff57>普通</color>英雄
|
boxDescTx1:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_24)) -- 必出<color=#5fff57>普通</color>英雄
|
||||||
self.boxBuyBtn1 = uiMap["box_sell_cell.bg.box_1.buy_btn"]
|
self.boxBuyBtn1 = uiMap["box_sell_cell.bg.box_1"]
|
||||||
self.boxBuyBtnCoin1 = uiMap["box_sell_cell.bg.box_1.buy_btn.coin"]
|
self.boxBuyBtnCoin1 = uiMap["box_sell_cell.bg.box_1.buy_btn.coin"]
|
||||||
self.boxBuyBtnTx1 = uiMap["box_sell_cell.bg.box_1.buy_btn.buy_tx"]
|
self.boxBuyBtnTx1 = uiMap["box_sell_cell.bg.box_1.buy_btn.buy_tx"]
|
||||||
local boxNameTx2 = uiMap["box_sell_cell.bg.box_2.name_tx"]
|
local boxNameTx2 = uiMap["box_sell_cell.bg.box_2.name_tx"]
|
||||||
boxNameTx2:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_2)) -- 精致宝箱
|
boxNameTx2:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_2)) -- 精致宝箱
|
||||||
local boxDescTx2 = uiMap["box_sell_cell.bg.box_2.desc_tx"]
|
local boxDescTx2 = uiMap["box_sell_cell.bg.box_2.desc_tx"]
|
||||||
boxDescTx2:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_25)) -- 必出<color=#8aedff>稀有</color>英雄
|
boxDescTx2:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_25)) -- 必出<color=#8aedff>稀有</color>英雄
|
||||||
self.boxBuyBtn2 = uiMap["box_sell_cell.bg.box_2.buy_btn"]
|
self.boxBuyBtn2 = uiMap["box_sell_cell.bg.box_2"]
|
||||||
self.boxBuyBtnCoin2 = uiMap["box_sell_cell.bg.box_2.buy_btn.coin"]
|
self.boxBuyBtnCoin2 = uiMap["box_sell_cell.bg.box_2.buy_btn.coin"]
|
||||||
self.boxBuyBtnTx2 = uiMap["box_sell_cell.bg.box_2.buy_btn.buy_tx"]
|
self.boxBuyBtnTx2 = uiMap["box_sell_cell.bg.box_2.buy_btn.buy_tx"]
|
||||||
self.box3 = uiMap["box_sell_cell.bg.box_3"]
|
self.box3 = uiMap["box_sell_cell.bg.box_3"]
|
||||||
@ -26,7 +26,7 @@ function BoxSellCell:init()
|
|||||||
boxNameTx3:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_3)) -- 珍贵宝箱
|
boxNameTx3:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_3)) -- 珍贵宝箱
|
||||||
local boxDescTx3 = uiMap["box_sell_cell.bg.box_3.desc_tx"]
|
local boxDescTx3 = uiMap["box_sell_cell.bg.box_3.desc_tx"]
|
||||||
boxDescTx3:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_26)) -- 必出<color=#ff8af0>史诗</color>英雄
|
boxDescTx3:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_26)) -- 必出<color=#ff8af0>史诗</color>英雄
|
||||||
self.boxBuyBtn3 = uiMap["box_sell_cell.bg.box_3.buy_btn"]
|
self.boxBuyBtn3 = uiMap["box_sell_cell.bg.box_3"]
|
||||||
self.boxBuyBtnCoin3 = uiMap["box_sell_cell.bg.box_3.buy_btn.coin"]
|
self.boxBuyBtnCoin3 = uiMap["box_sell_cell.bg.box_3.buy_btn.coin"]
|
||||||
self.boxBuyBtnTx3 = uiMap["box_sell_cell.bg.box_3.buy_btn.buy_tx"]
|
self.boxBuyBtnTx3 = uiMap["box_sell_cell.bg.box_3.buy_btn.buy_tx"]
|
||||||
self.progressSlider = uiMap["box_sell_cell.bg.progress_slider"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER)
|
self.progressSlider = uiMap["box_sell_cell.bg.progress_slider"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER)
|
||||||
@ -54,13 +54,15 @@ end
|
|||||||
|
|
||||||
function BoxSellCell:refresh()
|
function BoxSellCell:refresh()
|
||||||
if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.STORE_BOX_3_OPEN, true) then -- 没解锁的话第三个宝箱不显示
|
if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.STORE_BOX_3_OPEN, true) then -- 没解锁的话第三个宝箱不显示
|
||||||
self.cellHeight = BASE_CELL_HEIGHT + 20
|
self.cellHeight = BASE_CELL_HEIGHT + 70
|
||||||
self.baseObject:setSizeDeltaY(BASE_CELL_HEIGHT)
|
self.baseObject:setSizeDeltaY(BASE_CELL_HEIGHT)
|
||||||
|
self.bg:setTexture("assets/arts/textures/background/shop/shop_bg_10.png")
|
||||||
self.bg:setSizeDeltaY(BASE_CELL_HEIGHT - HEIGHT_ADD)
|
self.bg:setSizeDeltaY(BASE_CELL_HEIGHT - HEIGHT_ADD)
|
||||||
self.box3:setVisible(false)
|
self.box3:setVisible(false)
|
||||||
else
|
else
|
||||||
self.cellHeight = FULL_CELL_HEIGHT + 20
|
self.cellHeight = FULL_CELL_HEIGHT + 70
|
||||||
self.baseObject:setSizeDeltaY(FULL_CELL_HEIGHT)
|
self.baseObject:setSizeDeltaY(FULL_CELL_HEIGHT)
|
||||||
|
self.bg:setTexture("assets/arts/textures/background/shop/shop_bg_9.png")
|
||||||
self.bg:setSizeDeltaY(FULL_CELL_HEIGHT - HEIGHT_ADD)
|
self.bg:setSizeDeltaY(FULL_CELL_HEIGHT - HEIGHT_ADD)
|
||||||
self.box3:setVisible(true)
|
self.box3:setVisible(true)
|
||||||
end
|
end
|
||||||
|
|||||||
@ -59,7 +59,7 @@ function GemCell:refresh(id, cfgInfo)
|
|||||||
self.doubleNode:setVisible(true)
|
self.doubleNode:setVisible(true)
|
||||||
self.doubleDesc:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_21, tostring(leftDoubleTimes))) -- 剩余次数:{0}
|
self.doubleDesc:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_21, tostring(leftDoubleTimes))) -- 剩余次数:{0}
|
||||||
self.doubleText:setText("+" .. tostring(reward.num * 2))
|
self.doubleText:setText("+" .. tostring(reward.num * 2))
|
||||||
GFunc.centerImgAndTx(self.doubleImg, self.doubleText, 5)
|
-- GFunc.centerImgAndTx(self.doubleImg, self.doubleText, 5)
|
||||||
self.doubleOriginText:setText(reward.num)
|
self.doubleOriginText:setText(reward.num)
|
||||||
self.doubleOriginLine:setVisible(true)
|
self.doubleOriginLine:setVisible(true)
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user