ui细节调整

This commit is contained in:
Fang 2023-06-13 17:34:09 +08:00
parent a788b1cb8c
commit 1d68846a85
12 changed files with 116 additions and 73 deletions

View File

@ -237,9 +237,8 @@ local skill = {
},
["shake_time"]=200,
["shake_type"]=5,
["sound_hit"]={
1200120
},
["sound"]=12001200,
["sound_delay"]=0,
["name_act"]="skill01",
["fx_self"]=300022,
["bullet_time"]={
@ -1623,9 +1622,8 @@ local skill = {
},
["shake_time"]=200,
["shake_type"]=5,
["sound_hit"]={
2200120
},
["sound"]=22001200,
["sound_delay"]=0,
["name_act"]="skill01",
["fx_self"]=300009,
["bullet_time"]={
@ -1721,9 +1719,8 @@ local skill = {
},
["shake_time"]=200,
["shake_type"]=5,
["sound_hit"]={
2200120
},
["sound"]=22001200,
["sound_delay"]=0,
["name_act"]="skill01",
["fx_self"]=300009,
["bullet_time"]={
@ -2404,9 +2401,8 @@ local skill = {
},
["shake_time"]=200,
["shake_type"]=6,
["sound_hit"]={
2400120
},
["sound"]=24001200,
["sound_delay"]=0,
["name_act"]="skill01",
["fx_self"]=300032,
["bullet_time"]={
@ -2548,9 +2544,8 @@ local skill = {
},
["shake_time"]=200,
["shake_type"]=6,
["sound_hit"]={
2400120
},
["sound"]=24001200,
["sound_delay"]=0,
["name_act"]="skill01",
["fx_self"]=300032,
["bullet_time"]={
@ -2592,9 +2587,8 @@ local skill = {
},
["shake_time"]=200,
["shake_type"]=6,
["sound_hit"]={
2400120
},
["sound"]=24001200,
["sound_delay"]=0,
["name_act"]="skill01",
["fx_self"]=300032,
["bullet_time"]={
@ -2944,9 +2938,8 @@ local skill = {
},
["shake_time"]=200,
["shake_type"]=6,
["sound_hit"]={
3200120
},
["sound"]=32001200,
["sound_delay"]=0,
["name_act"]="skill01",
["fx_self"]=300004,
["bullet_time"]={
@ -3738,9 +3731,8 @@ local skill = {
},
["shake_time"]=200,
["shake_type"]=5,
["sound_hit"]={
3400120
},
["sound"]=34001200,
["sound_delay"]=0,
["name_act"]="skill01",
["fx_self"]=300092,
["bullet_time"]={
@ -4226,9 +4218,8 @@ local skill = {
},
["shake_time"]=200,
["shake_type"]=6,
["sound_hit"]={
4200120
},
["sound"]=42001200,
["sound_delay"]=0,
["name_act"]="skill01",
["fx_target"]=300014,
["bullet_time"]={
@ -6187,11 +6178,8 @@ local skill = {
},
["shake_time"]=200,
["shake_type"]=6,
["sound_hit"]={
54001201,
0,
54001203
},
["sound"]=54001200,
["sound_delay"]=0,
["name_act"]="skill01",
["fx_self"]=300089,
["bullet_time"]={
@ -6261,11 +6249,8 @@ local skill = {
},
["shake_time"]=200,
["shake_type"]=6,
["sound_hit"]={
54001201,
0,
54001203
},
["sound"]=54001200,
["sound_delay"]=0,
["name_act"]="skill01",
["fx_self"]=300089,
["bullet_time"]={

View File

@ -97,7 +97,7 @@ local localization_global =
["STR_UNLOCK"] = "解锁",
["TASK_DESC_1"] = "通行证专属任务",
["STR_COMPLETED"] = "已完成",
["HERO_CARD_TIPS_DESC"] = "可能获得以下英雄卡牌",
["HERO_CARD_TIPS_DESC"] = "可能获得以下英雄碎片",
["HERO_CARD_DESC_QLT_2"] = "优秀英雄",
["HERO_CARD_DESC_QLT_3"] = "稀有英雄",
["HERO_CARD_DESC_QLT_4"] = "史诗英雄",
@ -220,7 +220,7 @@ local localization_global =
["DUNGEON_GOLD_TITLE"] = "金币副本(需要包装)",
["DUNGEON_GOLD_HELP"] = "规定回合内击毁古代遗迹!",
["DUNGEON_GOLD_OPEN"] = "开启时间:周二、周四、周六、周日",
["DUNGEON_OPEN"] = "开启时间",
["DUNGEON_OPEN"] = "开启时间:",
["FIRST_PASS"] = "首通",
["PASS_REQUIRE"] = "通关上一关卡解锁",
["DUNGEON_STAGE"] = "关卡",

View File

@ -97,7 +97,7 @@ local localization_global =
["STR_UNLOCK"] = "Unlock",
["TASK_DESC_1"] = "Pass-exclusive Quest",
["STR_COMPLETED"] = "Completed",
["HERO_CARD_TIPS_DESC"] = "Possible Hero Card Rewards:",
["HERO_CARD_TIPS_DESC"] = "Possible Hero Shard Rewards:",
["HERO_CARD_DESC_QLT_2"] = "Uncommon Hero",
["HERO_CARD_DESC_QLT_3"] = "Rare Hero",
["HERO_CARD_DESC_QLT_4"] = "Epic Hero",

View File

@ -97,7 +97,7 @@ local localization_global =
["STR_UNLOCK"] = "解鎖",
["TASK_DESC_1"] = "通行證專屬任務",
["STR_COMPLETED"] = "已完成",
["HERO_CARD_TIPS_DESC"] = "可能會獲得以下英雄卡牌",
["HERO_CARD_TIPS_DESC"] = "可能會獲得以下英雄碎片",
["HERO_CARD_DESC_QLT_2"] = "優秀英雄",
["HERO_CARD_DESC_QLT_3"] = "稀有英雄",
["HERO_CARD_DESC_QLT_4"] = "史詩英雄",

View File

@ -116,6 +116,8 @@ function ChapterManager:endFightFinish(result)
DataManager:tryOpenModules()
-- 更新每日挑战数据
ModuleManager.DailyChallengeManager:onResetState()
-- 更新副本活动
DataManager.DungeonData:setDirty()
-- 章节通关 标记可弹出章节礼包
DataManager.ShopData:markPopUpGiftForActChapterStore(maxChapter)
ModuleManager.TaskManager:addTaskProgress(GConst.TaskConst.TASK_TYPE.X_PASS_CHAPTER)

View File

@ -32,6 +32,12 @@ end
-- 内部接口--------------------------------------------------------------------------
function DungeonManager:checkDayChange()
if not DataManager.DungeonData:getIfCanReset() then
return
end
-- 跨天重置数据
DataManager.DungeonData:onDayChange()
end
-- 请求挑战金币副本

View File

@ -8,7 +8,9 @@ function DungeonBoardCell:init()
self.txCountdown = self.uiMap["dungeon_board_cell.countdown.tx_countdown"]
self.txOpen = self.uiMap["dungeon_board_cell.tx_open"]
self.lock = self.uiMap["dungeon_board_cell.lock"]
self.lockIcon = self.uiMap["dungeon_board_cell.lock.desc.icon"]
self.lockTxLock = self.uiMap["dungeon_board_cell.lock.desc.tx_lock"]
self.lockIconCountdown = self.uiMap["dungeon_board_cell.lock.countdown.icon"]
self.lockTxCountdown = self.uiMap["dungeon_board_cell.lock.countdown.tx_countdown"]
self.btnStart = self.uiMap["dungeon_board_cell.btn_start"]
self.txStart = self.uiMap["dungeon_board_cell.btn_start.tx_btn"]
@ -29,7 +31,6 @@ end
function DungeonBoardCell:refresh(moduleKey)
self.moduleKey = moduleKey
self.baseObject:setName(self.moduleKey)
self:refreshInfo()
self:refreshRewards()
@ -37,8 +38,8 @@ end
function DungeonBoardCell:refreshInfo()
self.txTitle:setText(DataManager.DungeonData:getTitle(self.moduleKey))
self.txOpen:setText(DataManager.DungeonData:getOpenTimeDesc(self.moduleKey))
self.baseObject:setTexture(DataManager.DungeonData:getBanner(self.moduleKey))
self.txOpen:setText("<color=" .. DataManager.DungeonData:getOpenTextColor(self.moduleKey) .. ">" .. DataManager.DungeonData:getOpenTimeDesc(self.moduleKey) .. "</color>")
self.baseObject:setTexture(DataManager.DungeonData:getBanner(self.moduleKey))
if DataManager.DungeonData:isActive(self.moduleKey) then
self.btnStart:setVisible(true)
@ -66,6 +67,9 @@ function DungeonBoardCell:refreshInfo()
self.lockTxLock:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_OPEN))
self:refreshCountdown(self.lockTxCountdown)
end
GFunc.centerImgAndTx(self.lockIcon, self.lockTxLock, 10)
GFunc.centerImgAndTx(self.lockIconCountdown, self.lockTxCountdown, 10)
end
function DungeonBoardCell:refreshRewards()
@ -91,17 +95,24 @@ function DungeonBoardCell:refreshRewards()
end
function DungeonBoardCell:refreshCountdown(txCountdown)
if not self.countdownSid then
self.countdownSid = txCountdown:scheduleGlobal(function()
self:updateTime(txCountdown)
end, 1)
end
if self.countdownSid then
SchedulerManager:unscheduleGlobal(self.countdownSid)
self.countdownSid = nil
end
self.countdownSid = txCountdown:scheduleGlobal(function()
self:updateTime(txCountdown)
end, 1)
self:updateTime(txCountdown)
end
function DungeonBoardCell:updateTime(txCountdown)
local remainTime = Time:getTodaySurplusTime()
txCountdown:setText(GFunc.getTimeStrWithHMS(remainTime))
if self.remainTime == nil then
self.remainTime = DataManager.DungeonData:geNextTime(self.moduleKey)
else
self.remainTime = self.remainTime - 1
end
txCountdown:setText(GFunc.getTimeStrWithHMS(self.remainTime))
end
return DungeonBoardCell

View File

@ -48,6 +48,16 @@ function DungeonComp:refreshShow()
else
self.scrollRectComp:updateAllCell()
end
-- 跨天定时器
if self.countdownSid then
SchedulerManager:unscheduleGlobal(self.countdownSid)
self.countdownSid = nil
end
self.countdownSid = self:getBaseObject():scheduleGlobal(function()
ModuleManager.DungeonManager:checkDayChange()
end, Time:getTodaySurplusTime())
end
return DungeonComp

View File

@ -17,13 +17,9 @@ end
-- 初始化金币副本数据
function DungeonData:initDungeonGold(data)
-- if EDITOR_MODE then
-- data = {
-- today_challenge_count = 2,
-- max_chapter_gold_id = 2,
-- -- latest_chapter_gold_id = 1,-- todo 这是啥数据呢?
-- }
-- end
if data == nil then
return
end
self:initAllDataClass()
self.dataDungeons[ModuleManager.MODULE_KEY.DUNGEON_GOLD]:init(data)
@ -33,12 +29,8 @@ end
-- 初始化碎片副本数据
function DungeonData:initDungeonShards(data)
if EDITOR_MODE then
data = {
today_challenge_count = 2,
max_chapter_shards_id = 2,
-- latest_chapter_shards_id = 1,
}
if data == nil then
return
end
self:initAllDataClass()
@ -54,6 +46,21 @@ function DungeonData:initAllDataClass()
self.dataDungeons[ModuleManager.MODULE_KEY.DUNGEON_GOLD] = require "app/userdata/dungeon/dungeon_gold_data_comp":create()
self.dataDungeons[ModuleManager.MODULE_KEY.DUNGEON_SHARDS] = require "app/userdata/dungeon/dungeon_shards_data_comp":create()
end
self.initDay = Time:getBeginningOfServerToday()
end
function DungeonData:getIfCanReset()
return self.initDay < Time:getBeginningOfServerToday()
end
-- 跨天处理
function DungeonData:onDayChange()
self.data.gold.today_challenge_count = 0
self.data.shards.today_challenge_count = 0
self:initDungeonGold(self.data.gold)
self:initDungeonGold(self.data.shards)
end
-- 客户端处理副本次数+1的情况
@ -212,6 +219,15 @@ function DungeonData:getChallengeHpCost(moduleKey)
return self.dataDungeons[moduleKey]:getChallengeHpCost()
end
-- 获取副本下个状态改变时间
function DungeonData:geNextTime(moduleKey)
if self:isActive(moduleKey) then
return self:getCloseTime(moduleKey)
else
return self:getOpenTime(moduleKey)
end
end
-- 获取副本开启倒计时
function DungeonData:getOpenTime(moduleKey)
if not self.dataDungeons[moduleKey] then
@ -221,7 +237,7 @@ function DungeonData:getOpenTime(moduleKey)
local isClose = true
local count = 0
while isClose do
local checkWeek = Time:getWeekByTimeStamp(self:getServerTime() + ((count + 1) * 86400))
local checkWeek = Time:getWeekByTimeStamp(Time:getServerTime() + ((count + 1) * 86400))
if self:isActiveCycle(moduleKey, checkWeek) then
isClose = false
else
@ -241,7 +257,7 @@ function DungeonData:getCloseTime(moduleKey)
local isActive = true
local count = 0
while isActive do
local checkWeek = Time:getWeekByTimeStamp(self:getServerTime() + ((count + 1) * 86400))
local checkWeek = Time:getWeekByTimeStamp(Time:getServerTime() + ((count + 1) * 86400))
if not self:isActiveCycle(moduleKey, checkWeek) then
isActive = false
else
@ -252,11 +268,6 @@ function DungeonData:getCloseTime(moduleKey)
return Time:getTodaySurplusTime() + (count * 86400)
end
-- 获取看板展示的副本奖励
function DungeonData:getBoardShowRewards(moduleKey)
return nil
end
-- 获取看板展示的副本奖励(返回icon)
function DungeonData:getBoardShowRewardIcon(moduleKey)
return self.dataDungeons[moduleKey]:getBoardShowRewardIcon()
@ -327,6 +338,11 @@ function DungeonData:getBanner(moduleKey)
return self.dataDungeons[moduleKey]:getBanner()
end
-- 获取开启时间文本颜色
function DungeonData:getOpenTextColor(moduleKey)
return self.dataDungeons[moduleKey]:getOpenTextColor()
end
function DungeonData:setCurFightChapterId(chapterId)
self.curFightchapterId = chapterId or 1
end

View File

@ -51,6 +51,11 @@ function DungeonDataBaseComp:getBanner()
return nil
end
-- 获取开启时间文本颜色
function DungeonDataBaseComp:getOpenTextColor()
return nil
end
-- 获取总挑战次数
function DungeonDataBaseComp:getTotalChallengeCount()
return nil

View File

@ -26,7 +26,7 @@ function DungeonGoldDataComp:getModuleKey()
end
function DungeonGoldDataComp:getOpenWeekCycle()
return {1,2,3,4,5,6,7}
return {2,4,6,7}
end
function DungeonGoldDataComp:getConfigName()
@ -53,6 +53,10 @@ function DungeonGoldDataComp:getBanner()
return "assets/arts/textures/background/dungeon/dungeon_bg_1.png"
end
function DungeonGoldDataComp:getOpenTextColor()
return "#FFEDC5"
end
function DungeonGoldDataComp:getChallengeHpCost()
return GFunc.getConstReward("dungeon_gold_cost")
end

View File

@ -26,7 +26,7 @@ function DungeonShardsDataComp:getModuleKey()
end
function DungeonShardsDataComp:getOpenWeekCycle()
return {1,2,3,4,5,6,7}
return {1,3,5,7}
end
function DungeonShardsDataComp:getConfigName()
@ -53,6 +53,10 @@ function DungeonShardsDataComp:getBanner()
return "assets/arts/textures/background/dungeon/dungeon_bg_2.png"
end
function DungeonShardsDataComp:getOpenTextColor()
return "#E4F5FE"
end
function DungeonShardsDataComp:getChallengeHpCost()
return GFunc.getConstReward("dungeon_shards_cost")
end