副本入口
This commit is contained in:
parent
2610718eb2
commit
27ef576c8f
@ -350,6 +350,14 @@ local LocalizationGlobalConst =
|
||||
COLLECTION_DESC_12 = "COLLECTION_DESC_12",
|
||||
TIME_BEFORE_STR_H = "TIME_BEFORE_STR_H",
|
||||
TIME_BEFORE_STR_M = "TIME_BEFORE_STR_M",
|
||||
|
||||
["DUNGEON_ARMOR_DESC_1"] = "DUNGEON_ARMOR_DESC_1",
|
||||
["DUNGEON_ARMOR_DESC_2"] = "DUNGEON_ARMOR_DESC_2",
|
||||
["DUNGEON_ARMOR_DESC_3"] = "DUNGEON_ARMOR_DESC_3",
|
||||
|
||||
["DUNGEON_WEAPON_DESC_1"] = "DUNGEON_WEAPON_DESC_1",
|
||||
["DUNGEON_WEAPON_DESC_2"] = "DUNGEON_WEAPON_DESC_2",
|
||||
["DUNGEON_WEAPON_DESC_3"] = "DUNGEON_WEAPON_DESC_3",
|
||||
}
|
||||
|
||||
return LocalizationGlobalConst
|
||||
@ -12,6 +12,8 @@ function RewardCell:init()
|
||||
self.sImg = uiMap["reward_cell.item_bg.s"]
|
||||
self.matchImg = uiMap["reward_cell.item_bg.match_img"]
|
||||
self.frameAni = uiMap["reward_cell.frame_ani"]
|
||||
self.firstPass = uiMap["reward_cell.first"]
|
||||
self.firstPassTx = uiMap["reward_cell.first.tx_first"]
|
||||
self:hideFrameAnimation()
|
||||
self.baseObject:addClickListener(function()
|
||||
if self.clickCallback then
|
||||
@ -35,6 +37,7 @@ function RewardCell:refresh(reward)
|
||||
else
|
||||
self.rewardId = nil
|
||||
end
|
||||
self:showFirstPass(false)
|
||||
end
|
||||
|
||||
function RewardCell:refreshByConfig(reward, mask, check)
|
||||
@ -50,6 +53,7 @@ function RewardCell:refreshByConfig(reward, mask, check)
|
||||
else
|
||||
self.rewardId = nil
|
||||
end
|
||||
self:showFirstPass(false)
|
||||
end
|
||||
|
||||
function RewardCell:refreshItemById(itemId, count, mask, check)
|
||||
@ -61,6 +65,7 @@ function RewardCell:refreshItemById(itemId, count, mask, check)
|
||||
self.rewardId = itemId
|
||||
self.rewardType = GConst.REWARD_TYPE.ITEM
|
||||
self:_refreshItem(info, count)
|
||||
self:showFirstPass(false)
|
||||
end
|
||||
|
||||
function RewardCell:_refreshItem(info, count)
|
||||
@ -155,4 +160,11 @@ function RewardCell:showRightUpIcon(show, atlas, iconName)
|
||||
self.rightUpIcon:setSprite(atlas, iconName)
|
||||
end
|
||||
|
||||
function RewardCell:showFirstPass(show)
|
||||
self.firstPass:setVisible(show == true)
|
||||
if show then
|
||||
self.firstPassTx:setText(I18N:getGlobalText(I18N.GlobalConst.FIRST_PASS))
|
||||
end
|
||||
end
|
||||
|
||||
return RewardCell
|
||||
@ -19,8 +19,7 @@ function DungeonBoardCell:init()
|
||||
self.itemReward = self.uiMap["dungeon_board_cell.reward_cell"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL)
|
||||
|
||||
self.btnStart:addClickListener(function()
|
||||
-- 打开副本关卡选择界面
|
||||
UIManager:showUI("app/ui/dungeon/dungeon_difficulty_ui", {module = self.moduleKey})
|
||||
DataManager.DungeonData:onClickFight(self.moduleKey)
|
||||
end)
|
||||
self.btnHelp:addClickListener(function()
|
||||
-- 展示提示
|
||||
@ -72,6 +71,7 @@ function DungeonBoardCell:refreshInfo()
|
||||
self.lockTxLock:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_OPEN))
|
||||
self:refreshCountdown(self.lockTxCountdown)
|
||||
end
|
||||
self.txTimes:setVisible(not DataManager.DungeonData:isNoTotalLimit(self.moduleKey))
|
||||
|
||||
GFunc.centerImgAndTx(self.lockIcon, self.lockTxLock, 10)
|
||||
GFunc.centerImgAndTx(self.lockIconCountdown, self.lockTxCountdown, 10)
|
||||
@ -88,9 +88,8 @@ function DungeonBoardCell:refreshCountdown(txCountdown)
|
||||
self.countdownSid = nil
|
||||
end
|
||||
if DataManager.DungeonData:getIsAllTimeOpen(self.moduleKey) then
|
||||
txCountdown:setVisible(false)
|
||||
self.countdown:setVisible(false)
|
||||
else
|
||||
txCountdown:setVisible(true)
|
||||
self.countdownSid = self:getBaseObject():scheduleGlobal(function()
|
||||
self:updateTime(txCountdown)
|
||||
end, 1)
|
||||
|
||||
@ -54,11 +54,18 @@ function DungeonArmorEntity:getBanner()
|
||||
end
|
||||
|
||||
function DungeonArmorEntity:getOpenTextColor()
|
||||
return "#FFEDC5"
|
||||
return "#FFFFFF"
|
||||
end
|
||||
|
||||
function DungeonArmorEntity:getChallengeHpCost()
|
||||
return GFunc.getConstReward("dungeon_armor_limit")
|
||||
end
|
||||
|
||||
function DungeonArmorEntity:isNoTotalLimit()
|
||||
return true
|
||||
end
|
||||
|
||||
function DungeonArmorEntity:onClickFight()
|
||||
end
|
||||
|
||||
return DungeonArmorEntity
|
||||
@ -100,11 +100,21 @@ function DungeonBaseEntity:getPassRewardNum()
|
||||
return 0
|
||||
end
|
||||
|
||||
function DungeonBaseEntity:isNoTotalLimit()
|
||||
return false
|
||||
end
|
||||
|
||||
function DungeonBaseEntity:onClickFight()
|
||||
UIManager:showUI("app/ui/dungeon/dungeon_difficulty_ui", {module = self:getModuleKey()})
|
||||
end
|
||||
|
||||
-- 常规逻辑 *********************************************************************
|
||||
|
||||
-- 获取今日剩余挑战次数
|
||||
function DungeonBaseEntity:getTodayRemainLimitCount()
|
||||
if self:isNoTotalLimit() then
|
||||
return 1
|
||||
end
|
||||
return self:getTodayMaxCount() - self:getTodayChallengeCount()
|
||||
end
|
||||
|
||||
|
||||
@ -451,4 +451,12 @@ function DungeonData:getIsAllTimeOpen(moduleKey)
|
||||
return self.dataDungeons[moduleKey]:getIsAllTimeOpen()
|
||||
end
|
||||
|
||||
function DungeonData:isNoTotalLimit(moduleKey)
|
||||
return self.dataDungeons[moduleKey]:isNoTotalLimit()
|
||||
end
|
||||
|
||||
function DungeonData:onClickFight(moduleKey)
|
||||
self.dataDungeons[moduleKey]:onClickFight()
|
||||
end
|
||||
|
||||
return DungeonData
|
||||
@ -59,4 +59,11 @@ function DungeonWeaponEntity:getChallengeHpCost()
|
||||
return GFunc.getConstReward("dungeon_armor_limit")
|
||||
end
|
||||
|
||||
function DungeonWeaponEntity:isNoTotalLimit()
|
||||
return true
|
||||
end
|
||||
|
||||
function DungeonWeaponEntity:onClickFight()
|
||||
end
|
||||
|
||||
return DungeonWeaponEntity
|
||||
Loading…
x
Reference in New Issue
Block a user