活动整理

This commit is contained in:
puxuan 2025-10-07 11:18:52 +08:00
parent c013201b38
commit 933bbc243f
43 changed files with 871 additions and 782 deletions

View File

@ -93,7 +93,6 @@ BIReport.ITEM_GET_TYPE = {
ACT_CHAPTER_STORE = "ActChapterStore", -- 章节礼包 ACT_CHAPTER_STORE = "ActChapterStore", -- 章节礼包
SUMMON = "Summon", SUMMON = "Summon",
PLAYER_LV_UP = "PlayerLvUp", PLAYER_LV_UP = "PlayerLvUp",
GOLD_PIG = "GoldPig",
BATTLE_SKILL_REFRESH = "BattleSkillRefresh", BATTLE_SKILL_REFRESH = "BattleSkillRefresh",
GROWTH_FUND = "GrowthFund", GROWTH_FUND = "GrowthFund",
GROW_UP_GIFT_NEW = "GrowUpGiftNew", -- 新成长礼包 GROW_UP_GIFT_NEW = "GrowUpGiftNew", -- 新成长礼包
@ -273,7 +272,6 @@ BIReport.GIFT_TYPE = {
BEGINNER_GIFT = "BeginnerGift", BEGINNER_GIFT = "BeginnerGift",
LEVEL_UP_GIFT = "LevelUpGift", LEVEL_UP_GIFT = "LevelUpGift",
BOUNTY = "Bounty", BOUNTY = "Bounty",
GOLD_PIG = "GoldPig",
MALL_TREASURE = "MallTreasure", MALL_TREASURE = "MallTreasure",
ACT_CHAPTER_STORE = "ActChapterStore", ACT_CHAPTER_STORE = "ActChapterStore",
GROWTH_FUND = "GrowthFund", GROWTH_FUND = "GrowthFund",

View File

@ -81,6 +81,9 @@ EventManager.CUSTOM_EVENT = {
FORCE_SUMMON_CHECK_PATH_GM = "FORCE_SUMMON_CHECK_PATH_GM", FORCE_SUMMON_CHECK_PATH_GM = "FORCE_SUMMON_CHECK_PATH_GM",
UPDATE_SIDE_BAR = "UPDATE_SIDE_BAR", UPDATE_SIDE_BAR = "UPDATE_SIDE_BAR",
-- 活动
CHANGE_ACTIVITY_PAGE = "CHANGE_ACTIVITY_PAGE",
CROSS_DAY = "CROSS_DAY",-- 跨天 CROSS_DAY = "CROSS_DAY",-- 跨天
} }

View File

@ -90,7 +90,6 @@ local MODULE_PATHS = {
-- 这里的key对应func_open里的id -- 这里的key对应func_open里的id
ModuleManager.MODULE_KEY = { ModuleManager.MODULE_KEY = {
GOLD_PIG = "act_gold_pig",
SEVEN_DAY = "act_sevenday", SEVEN_DAY = "act_sevenday",
TASK = "task", TASK = "task",
STORE_BOX_OPEN = "store_box_open", STORE_BOX_OPEN = "store_box_open",

View File

@ -16,7 +16,6 @@ function ServerPushManager:initWhenLogin()
self:addServerPushListener(ProtoMsgType.FromMsgEnum.BountyBoughtNtf, ModuleManager.BountyManager, ModuleManager.BountyManager.onBoughtBountyFinish) self:addServerPushListener(ProtoMsgType.FromMsgEnum.BountyBoughtNtf, ModuleManager.BountyManager, ModuleManager.BountyManager.onBoughtBountyFinish)
self:addServerPushListener(ProtoMsgType.FromMsgEnum.ArenaBountyBoughtNtf, ModuleManager.ArenaBountyManager, ModuleManager.ArenaBountyManager.onBoughtBountyFinish) self:addServerPushListener(ProtoMsgType.FromMsgEnum.ArenaBountyBoughtNtf, ModuleManager.ArenaBountyManager, ModuleManager.ArenaBountyManager.onBoughtBountyFinish)
self:addServerPushListener(ProtoMsgType.FromMsgEnum.NewMailNtf, ModuleManager.MailManager, ModuleManager.MailManager.needUpdateMail) self:addServerPushListener(ProtoMsgType.FromMsgEnum.NewMailNtf, ModuleManager.MailManager, ModuleManager.MailManager.needUpdateMail)
-- self:addServerPushListener(ProtoMsgType.FromMsgEnum.PigLevelUpNtf, ModuleManager.ActivityManager, ModuleManager.ActivityManager.onBoughtGoldPigFinish)
self:addServerPushListener(ProtoMsgType.FromMsgEnum.TriggerLevelUpGiftNtf, ModuleManager.ShopManager, ModuleManager.ShopManager.onTriggerLevelUpGift) self:addServerPushListener(ProtoMsgType.FromMsgEnum.TriggerLevelUpGiftNtf, ModuleManager.ShopManager, ModuleManager.ShopManager.onTriggerLevelUpGift)
self:addServerPushListener(ProtoMsgType.FromMsgEnum.TriggerGrowUpGift2Ntf, ModuleManager.ShopManager, ModuleManager.ShopManager.onTriggerGrowUpGift) self:addServerPushListener(ProtoMsgType.FromMsgEnum.TriggerGrowUpGift2Ntf, ModuleManager.ShopManager, ModuleManager.ShopManager.onTriggerGrowUpGift)
-- self:addServerPushListener(ProtoMsgType.FromMsgEnum.MallDailyResetNtf, ModuleManager.ShopManager, ModuleManager.ShopManager.onMallDailyReset) -- self:addServerPushListener(ProtoMsgType.FromMsgEnum.MallDailyResetNtf, ModuleManager.ShopManager, ModuleManager.ShopManager.onMallDailyReset)

View File

@ -1,100 +1,33 @@
local ActSprintConst = {} local ActSprintConst = {}
ActSprintConst.ACT_ID = { ActSprintConst.ACT_ID = {
-- SUMMON = 11301,
-- CORE_SOUL_BOX = 11401,
-- SUMMON_V2 = 11501,
-- CORE_SOUL_BOX_V2 = 11601,
-- 新版新手 -- 新版新手
SUMMON_ALL = 10001, SUMMON_ALL = 10001,
-- CORE_SOUL_BOX_ALL = 11801,
-- -- Loop
-- SUMMON_LOOP = 11901,
-- CORE_SOUL_BOX_LOOP = 12001,
-- TREE_LOOP = 12101,
} }
ActSprintConst.ACT_ID_NOT_SHOP = { ActSprintConst.ACT_ID_NOT_SHOP = {
-- [ActSprintConst.ACT_ID.SUMMON] = true,
-- [ActSprintConst.ACT_ID.CORE_SOUL_BOX] = true,
-- [ActSprintConst.ACT_ID.SUMMON_V2] = true,
-- [ActSprintConst.ACT_ID.CORE_SOUL_BOX_V2] = true,
} }
ActSprintConst.ACT_ID_MAP = { ActSprintConst.ACT_ID_MAP = {
-- [ActSprintConst.ACT_ID.SUMMON] = true,
-- [ActSprintConst.ACT_ID.CORE_SOUL_BOX] = true,
-- [ActSprintConst.ACT_ID.SUMMON_V2] = true,
-- [ActSprintConst.ACT_ID.CORE_SOUL_BOX_V2] = true,
[ActSprintConst.ACT_ID.SUMMON_ALL] = true, [ActSprintConst.ACT_ID.SUMMON_ALL] = true,
-- [ActSprintConst.ACT_ID.CORE_SOUL_BOX_ALL] = true,
-- [ActSprintConst.ACT_ID.SUMMON_LOOP] = true,
-- [ActSprintConst.ACT_ID.CORE_SOUL_BOX_LOOP] = true,
-- [ActSprintConst.ACT_ID.TREE_LOOP] = true,
} }
ActSprintConst.ACT_LIST_BANNER = { ActSprintConst.ACT_LIST_BANNER = {
-- [ActSprintConst.ACT_ID.SUMMON] = "assets/arts/textures/background/act_gogogo/act_gogogo_bg_2.png",
-- [ActSprintConst.ACT_ID.CORE_SOUL_BOX] = "assets/arts/textures/background/act_gogogo/act_gogogo_bg_5.png",
-- [ActSprintConst.ACT_ID.SUMMON_V2] = "assets/arts/textures/background/act_gogogo/act_gogogo_bg_2.png",
-- [ActSprintConst.ACT_ID.CORE_SOUL_BOX_V2] = "assets/arts/textures/background/act_gogogo/act_gogogo_bg_5.png",
[ActSprintConst.ACT_ID.SUMMON_ALL] = "assets/arts/textures/background/act_gogogo/act_gogogo_bg_2.png", [ActSprintConst.ACT_ID.SUMMON_ALL] = "assets/arts/textures/background/act_gogogo/act_gogogo_bg_2.png",
-- [ActSprintConst.ACT_ID.CORE_SOUL_BOX_ALL] = "assets/arts/textures/background/act_gogogo/act_gogogo_bg_5.png",
-- [ActSprintConst.ACT_ID.SUMMON_LOOP] = "assets/arts/textures/background/act_gogogo/act_gogogo_bg_2.png",
-- [ActSprintConst.ACT_ID.CORE_SOUL_BOX_LOOP] = "assets/arts/textures/background/act_gogogo/act_gogogo_bg_5.png",
-- [ActSprintConst.ACT_ID.TREE_LOOP] = "assets/arts/textures/background/act_gogogo/act_gogogo_bg_7.png",
} }
ActSprintConst.ACT_LIST_NAME = { ActSprintConst.ACT_LIST_NAME = {
-- [ActSprintConst.ACT_ID.SUMMON] = I18N.GlobalConst.ACT_GOGOGO_DESC_1,
-- [ActSprintConst.ACT_ID.CORE_SOUL_BOX] = I18N.GlobalConst.ACT_GOGOGO_DESC_1,
-- [ActSprintConst.ACT_ID.SUMMON_V2] = I18N.GlobalConst.ACT_GOGOGO_DESC_1,
-- [ActSprintConst.ACT_ID.CORE_SOUL_BOX_V2] = I18N.GlobalConst.ACT_GOGOGO_DESC_1,
[ActSprintConst.ACT_ID.SUMMON_ALL] = I18N.GlobalConst.ACT_GOGOGO_DESC_1, [ActSprintConst.ACT_ID.SUMMON_ALL] = I18N.GlobalConst.ACT_GOGOGO_DESC_1,
-- [ActSprintConst.ACT_ID.CORE_SOUL_BOX_ALL] = I18N.GlobalConst.ACT_GOGOGO_DESC_1,
-- [ActSprintConst.ACT_ID.SUMMON_LOOP] = I18N.GlobalConst.ACT_GOGOGO_DESC_1,
-- [ActSprintConst.ACT_ID.CORE_SOUL_BOX_LOOP] = I18N.GlobalConst.ACT_GOGOGO_DESC_1,
-- [ActSprintConst.ACT_ID.TREE_LOOP] = I18N.GlobalConst.ACT_GOGOGO_DESC_1,
} }
ActSprintConst.ACT_MAIN_BANNER = { ActSprintConst.ACT_MAIN_BANNER = {
-- [ActSprintConst.ACT_ID.SUMMON] = "assets/arts/textures/background/act_gogogo/act_gogogo_bg_1.png",
-- [ActSprintConst.ACT_ID.CORE_SOUL_BOX] = "assets/arts/textures/background/act_gogogo/act_gogogo_bg_4.png",
-- [ActSprintConst.ACT_ID.SUMMON_V2] = "assets/arts/textures/background/act_gogogo/act_gogogo_bg_1.png",
-- [ActSprintConst.ACT_ID.CORE_SOUL_BOX_V2] = "assets/arts/textures/background/act_gogogo/act_gogogo_bg_4.png",
[ActSprintConst.ACT_ID.SUMMON_ALL] = "assets/arts/textures/background/act_gogogo/act_gogogo_bg_1.png", [ActSprintConst.ACT_ID.SUMMON_ALL] = "assets/arts/textures/background/act_gogogo/act_gogogo_bg_1.png",
-- [ActSprintConst.ACT_ID.CORE_SOUL_BOX_ALL] = "assets/arts/textures/background/act_gogogo/act_gogogo_bg_4.png",
-- [ActSprintConst.ACT_ID.SUMMON_LOOP] = "assets/arts/textures/background/act_gogogo/act_gogogo_bg_1.png",
-- [ActSprintConst.ACT_ID.CORE_SOUL_BOX_LOOP] = "assets/arts/textures/background/act_gogogo/act_gogogo_bg_4.png",
-- [ActSprintConst.ACT_ID.TREE_LOOP] = "assets/arts/textures/background/act_gogogo/act_gogogo_bg_6.png",
} }
ActSprintConst.ACT_ROUND_LIMIT = { ActSprintConst.ACT_ROUND_LIMIT = {
-- [ActSprintConst.ACT_ID.SUMMON] = GFunc.getConstIntValue("act_gogogo_round_limit_1"),
-- [ActSprintConst.ACT_ID.CORE_SOUL_BOX] = GFunc.getConstIntValue("act_gogogo_round_limit_2"),
-- [ActSprintConst.ACT_ID.SUMMON_V2] = GFunc.getConstIntValue("act_gogogo_round_limit_3"),
-- [ActSprintConst.ACT_ID.CORE_SOUL_BOX_V2] = GFunc.getConstIntValue("act_gogogo_round_limit_4"),
[ActSprintConst.ACT_ID.SUMMON_ALL] = GFunc.getConstIntValue("act_gogogo_round_limit_1"), [ActSprintConst.ACT_ID.SUMMON_ALL] = GFunc.getConstIntValue("act_gogogo_round_limit_1"),
-- [ActSprintConst.ACT_ID.CORE_SOUL_BOX_ALL] = GFunc.getConstIntValue("act_gogogo_round_limit_6"),
-- [ActSprintConst.ACT_ID.SUMMON_LOOP] = GFunc.getConstIntValue("act_gogogo_round_limit_7"),
-- [ActSprintConst.ACT_ID.CORE_SOUL_BOX_LOOP] = GFunc.getConstIntValue("act_gogogo_round_limit_8"),
-- [ActSprintConst.ACT_ID.TREE_LOOP] = GFunc.getConstIntValue("act_gogogo_round_limit_9"),
} }
ActSprintConst.ACT_ROUND_REWARD = { ActSprintConst.ACT_ROUND_REWARD = {
-- [ActSprintConst.ACT_ID.SUMMON] = GFunc.getConstCost("act_gogogo_round_reward_1", true), [ActSprintConst.ACT_ID.SUMMON_ALL] = GFunc.getConstReward2("act_gogogo_round_reward_1"),
-- [ActSprintConst.ACT_ID.CORE_SOUL_BOX] = GFunc.getConstCost("act_gogogo_round_reward_2", true),
-- [ActSprintConst.ACT_ID.SUMMON_V2] = GFunc.getConstCost("act_gogogo_round_reward_3", true),
-- [ActSprintConst.ACT_ID.CORE_SOUL_BOX_V2] = GFunc.getConstCost("act_gogogo_round_reward_4", true),
[ActSprintConst.ACT_ID.SUMMON_ALL] = GFunc.getConstReward2("act_gogogo_round_reward_1", true),
-- [ActSprintConst.ACT_ID.CORE_SOUL_BOX_ALL] = GFunc.getConstCost("act_gogogo_round_reward_6", true),
-- [ActSprintConst.ACT_ID.SUMMON_LOOP] = GFunc.getConstCost("act_gogogo_round_reward_7", true),
-- [ActSprintConst.ACT_ID.CORE_SOUL_BOX_LOOP] = GFunc.getConstCost("act_gogogo_round_reward_8", true),
-- [ActSprintConst.ACT_ID.TREE_LOOP] = GFunc.getConstCost("act_gogogo_round_reward_9", true),
} }
ActSprintConst.REFRESH_TYPE = { ActSprintConst.REFRESH_TYPE = {
@ -111,103 +44,21 @@ ActSprintConst.MAIN_PAGE_TYPE = {
} }
ActSprintConst.MAIN_PAGE_BTN_ICON_1 = { ActSprintConst.MAIN_PAGE_BTN_ICON_1 = {
-- [ActSprintConst.ACT_ID.SUMMON] = {
-- [1] = "act_common_btn_27_1",
-- [2] = "act_common_btn_28_1",
-- [3] = "act_common_btn_29_1",
-- },
-- [ActSprintConst.ACT_ID.CORE_SOUL_BOX] = {
-- [1] = "act_common_btn_27_1",
-- [2] = "act_common_btn_28_1",
-- [3] = "act_common_btn_29_1",
-- },
-- [ActSprintConst.ACT_ID.SUMMON_V2] = {
-- [1] = "act_common_btn_27_1",
-- [2] = "act_common_btn_34_1",
-- [3] = "act_common_btn_28_1",
-- },
-- [ActSprintConst.ACT_ID.CORE_SOUL_BOX_V2] = {
-- [1] = "act_common_btn_27_1",
-- [2] = "act_common_btn_34_1",
-- [3] = "act_common_btn_28_1",
-- },
[ActSprintConst.ACT_ID.SUMMON_ALL] = { [ActSprintConst.ACT_ID.SUMMON_ALL] = {
[1] = "act_common_btn_27_1", [1] = "act_common_btn_27_1",
[2] = "act_common_btn_34_1", [2] = "act_common_btn_34_1",
[3] = "act_common_btn_29_1", [3] = "act_common_btn_29_1",
[4] = "act_common_btn_28_1", [4] = "act_common_btn_28_1",
}, },
-- [ActSprintConst.ACT_ID.CORE_SOUL_BOX_ALL] = {
-- [1] = "act_common_btn_27_1",
-- [2] = "act_common_btn_34_1",
-- [3] = "act_common_btn_29_1",
-- [4] = "act_common_btn_28_1",
-- },
-- [ActSprintConst.ACT_ID.SUMMON_LOOP] = {
-- [1] = "act_common_btn_27_1",
-- [2] = "act_common_btn_34_1",
-- [3] = "act_common_btn_28_1",
-- },
-- [ActSprintConst.ACT_ID.CORE_SOUL_BOX_LOOP] = {
-- [1] = "act_common_btn_27_1",
-- [2] = "act_common_btn_34_1",
-- [3] = "act_common_btn_28_1",
-- },
-- [ActSprintConst.ACT_ID.TREE_LOOP] = {
-- [1] = "act_common_btn_27_1",
-- [2] = "act_common_btn_34_1",
-- [3] = "act_common_btn_28_1",
-- },
} }
ActSprintConst.MAIN_PAGE_BTN_ICON_2 = { ActSprintConst.MAIN_PAGE_BTN_ICON_2 = {
-- [ActSprintConst.ACT_ID.SUMMON] = {
-- [1] = "act_common_btn_27_2",
-- [2] = "act_common_btn_28_2",
-- [3] = "act_common_btn_29_2",
-- },
-- [ActSprintConst.ACT_ID.CORE_SOUL_BOX] = {
-- [1] = "act_common_btn_27_2",
-- [2] = "act_common_btn_28_2",
-- [3] = "act_common_btn_29_2",
-- },
-- [ActSprintConst.ACT_ID.SUMMON_V2] = {
-- [1] = "act_common_btn_27_2",
-- [2] = "act_common_btn_34_2",
-- [3] = "act_common_btn_28_2",
-- },
-- [ActSprintConst.ACT_ID.CORE_SOUL_BOX_V2] = {
-- [1] = "act_common_btn_27_2",
-- [2] = "act_common_btn_34_2",
-- [3] = "act_common_btn_28_2",
-- },
[ActSprintConst.ACT_ID.SUMMON_ALL] = { [ActSprintConst.ACT_ID.SUMMON_ALL] = {
[1] = "act_common_btn_27_2", [1] = "act_common_btn_27_2",
[2] = "act_common_btn_34_2", [2] = "act_common_btn_34_2",
[3] = "act_common_btn_29_2", [3] = "act_common_btn_29_2",
[4] = "act_common_btn_28_2", [4] = "act_common_btn_28_2",
}, },
-- [ActSprintConst.ACT_ID.CORE_SOUL_BOX_ALL] = {
-- [1] = "act_common_btn_27_2",
-- [2] = "act_common_btn_34_2",
-- [3] = "act_common_btn_29_2",
-- [4] = "act_common_btn_28_2",
-- },
-- [ActSprintConst.ACT_ID.SUMMON_LOOP] = {
-- [1] = "act_common_btn_27_2",
-- [2] = "act_common_btn_34_2",
-- [3] = "act_common_btn_28_2",
-- },
-- [ActSprintConst.ACT_ID.CORE_SOUL_BOX_LOOP] = {
-- [1] = "act_common_btn_27_2",
-- [2] = "act_common_btn_34_2",
-- [3] = "act_common_btn_28_2",
-- },
-- [ActSprintConst.ACT_ID.TREE_LOOP] = {
-- [1] = "act_common_btn_27_2",
-- [2] = "act_common_btn_34_2",
-- [3] = "act_common_btn_28_2",
-- },
} }
ActSprintConst.MAIN_PAGE_BTN_DESC = { ActSprintConst.MAIN_PAGE_BTN_DESC = {
@ -217,5 +68,32 @@ ActSprintConst.MAIN_PAGE_BTN_DESC = {
[ActSprintConst.MAIN_PAGE_TYPE.LOGIN] = "ACT_GOGOGO_DESC_20", [ActSprintConst.MAIN_PAGE_TYPE.LOGIN] = "ACT_GOGOGO_DESC_20",
} }
ActSprintConst.BOTTOM_PAGE = {
SCORE_TASK = 1,
BOUNTY = 2,
GIFT = 3,
TASK = 4,
}
ActSprintConst.COMP = {
[ActSprintConst.BOTTOM_PAGE.SCORE_TASK] = "app/ui/activity/common/comp/act_score_task_comp_v1",
[ActSprintConst.BOTTOM_PAGE.BOUNTY] = "app/ui/activity/common/comp/act_bounty_comp_v1",
[ActSprintConst.BOTTOM_PAGE.GIFT] = "app/ui/activity/common/comp/act_gift_comp_v1",
[ActSprintConst.BOTTOM_PAGE.TASK] = "app/ui/activity/common/comp/act_task_comp_v1",
}
ActSprintConst.COMP_NAME = {
[ActSprintConst.BOTTOM_PAGE.SCORE_TASK] = "act_main_ui.sub_comps.act_score_task_comp_v1",
[ActSprintConst.BOTTOM_PAGE.BOUNTY] = "act_main_ui.sub_comps.act_bounty_comp_v1",
[ActSprintConst.BOTTOM_PAGE.GIFT] = "act_main_ui.sub_comps.act_gift_comp_v1",
[ActSprintConst.BOTTOM_PAGE.TASK] = "act_main_ui.sub_comps.act_task_comp_v1",
}
-- 动态加载的组件
ActSprintConst.COMP_PATH = {
-- [ActSprintConst.BOTTOM_PAGE.BOUNTY] = "assets/prefabs/ui/activity/common/comp/act_bounty_comp.prefab",
-- [ActSprintConst.BOTTOM_PAGE.EXCHANGE] = "assets/prefabs/ui/activity/common/comp/act_exchange_comp.prefab",
-- [ActSprintConst.BOTTOM_PAGE.GIFT] = "assets/prefabs/ui/activity/common/comp/act_gift_comp.prefab",
}
return ActSprintConst return ActSprintConst

View File

@ -13,7 +13,7 @@ end
function ActSprintManager:showActSprintMainUI(params) function ActSprintManager:showActSprintMainUI(params)
local actId = params.actId local actId = params.actId
if actId == GConst.ActSprintConst.ACT_ID.SUMMON_ALL then if actId == GConst.ActSprintConst.ACT_ID.SUMMON_ALL then
UIManager:showUI("app/ui/activity/act_sprint_summon_all/act_sprint_main_ui", params) UIManager:showUI("app/ui/activity/act_sprint_summon_all/act_main_ui", params)
end end
-- if actId == GConst.ActSprintConst.ACT_ID.SUMMON then -- if actId == GConst.ActSprintConst.ACT_ID.SUMMON then
-- UIManager:showUI("app/ui/activity/act_sprint_summon/act_sprint_main_ui", params) -- UIManager:showUI("app/ui/activity/act_sprint_summon/act_sprint_main_ui", params)

View File

@ -129,8 +129,6 @@ function ChapterManager:endFightFinish(result)
ModuleManager.BattleManager:showBattleResultUI(GConst.BattleConst.BATTLE_TYPE.STAGE, newRewards, reqData.combatReport, mysteryBoxIdx, nil, true) ModuleManager.BattleManager:showBattleResultUI(GConst.BattleConst.BATTLE_TYPE.STAGE, newRewards, reqData.combatReport, mysteryBoxIdx, nil, true)
DataManager.ChapterData:fightChapter(reqData.chapter_id, result.max_chapter_id, result.max_wave, reqData.mystery_box_idx) DataManager.ChapterData:fightChapter(reqData.chapter_id, result.max_chapter_id, result.max_wave, reqData.mystery_box_idx)
DataManager.ChapterData:clearChapterBoxState() DataManager.ChapterData:clearChapterBoxState()
-- 处理金猪,要在章节更新之后
DataManager.GoldPigData:addGoldPigCount()
local newMaxChapter = DataManager.ChapterData:getNewChapterId() local newMaxChapter = DataManager.ChapterData:getNewChapterId()
if maxChapter ~= newMaxChapter then if maxChapter ~= newMaxChapter then

View File

@ -0,0 +1,143 @@
local ActBaseUI = require "app/ui/activity/common/act_base_ui"
local ActMainUI = class("ActMainUI", ActBaseUI)
local PAGE_BTN_NORMAL = {
"act_common_btn_27_2",
"act_common_btn_34_2",
"act_common_btn_29_2",
"act_common_btn_28_2",
}
local PAGE_BTN_LIGHT = {
"act_common_btn_27_1",
"act_common_btn_34_1",
"act_common_btn_29_1",
"act_common_btn_28_1",
}
local PAGE_BTN_DESC = {
"ACT_GOGOGO_DESC_1",
"ACT_GOGOGO_DESC_10",
"ACT_GOGOGO_DESC_11",
"ACT_GOGOGO_DESC_20",
}
function ActMainUI:showCommonBG()
return false
end
function ActMainUI:onPressBackspace()
self:closeUI()
end
function ActMainUI:currencyParams()
self.params = {}
self.params.showType = GConst.CURRENCY_TYPE.HORIZONTAL
if self.curPage == 3 then
self.params.itemIds = {
GConst.ItemConst.ITEM_ID_GEM,
}
else
self.params.itemIds = {}
end
return self.params, true
end
function ActMainUI:ctor(params)
self.params = params or {}
self.actId = params.actId
self.curPage = params.page or self:getRpPage()
end
function ActMainUI:getPrefabPath()
return "assets/prefabs/ui/activity/act_sprint/act_main_ui.prefab"
end
function ActMainUI:getRpPage()
for i = 1, 4 do
if DataManager[self:getActDataType()]:getRpByPage(i) then
return i
end
end
return 1
end
-- region 活动功能接口
function ActMainUI:getActConst()
return GConst.ActSprintConst
end
function ActMainUI:getActDataType()
return "ActSprintSummonDataAll"
end
function ActMainUI:getGiftAdType()
return BIReport.ADS_CLICK_TYPE.AD_NEW_NEW_GIFT
end
function ActMainUI:getBountyLvRes(active)
if active then
return GConst.ATLAS_PATH.UI_ACT_COMMON, "act_common_dec_4"
else
return GConst.ATLAS_PATH.UI_ACT_COMMON, "act_common_dec_3"
end
end
function ActMainUI:getCellName(page)
page = page or self.page
return I18N:getGlobalText(PAGE_BTN_DESC[page])
end
function ActMainUI:showGamePreviewUI()
local params = {}
params.dataKey = self:getActDataType()
params.parentUI = self
ModuleManager.ActivityManager:showFishPreviewUI(params)
end
function ActMainUI:getPageBtnName(index, light)
if light then
return PAGE_BTN_LIGHT[index]
else
return PAGE_BTN_NORMAL[index]
end
end
function ActMainUI:getShowBountyBg()
return false
end
function ActMainUI:isShowBannerLine1()
return false
end
function ActMainUI:getBountyBanner()
return "assets/arts/textures/background/act_newnew/act_newnew_bg_2.png"
end
--@endregion
-- region 活动消息
function ActMainUI:reqActivityGameDo(score)
ModuleManager.ActNewNewManager:reqActivityGameDo(score)
end
function ActMainUI:reqActivityGameTarget(id)
ModuleManager.ActNewNewManager:reqActivityGameTarget(0)
end
function ActMainUI:reqActivityTarget(id)
ModuleManager.ActNewNewManager:reqActivityTarget(id)
end
function ActMainUI:reqActivityPlay(count, isFree)
ModuleManager.ActNewNewManager:reqActivityPlay(count, isFree)
end
function ActMainUI:onClaimAllRewards()
ModuleManager.ActNewNewManager:onClaimAllRewards()
end
function ActMainUI:onUnlockProReward(gear)
ModuleManager.ActNewNewManager:onUnlockProReward(gear)
end
--@endregion
return ActMainUI

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: a8b0bda5edab9ab44a9d8cd117347310 guid: 4f6b3b4dd840749b189863949799ece6
ScriptedImporter: ScriptedImporter:
internalIDToNameTable: [] internalIDToNameTable: []
externalObjects: {} externalObjects: {}

View File

@ -1,244 +0,0 @@
local ActSprintMainUI = class("ActSprintMainUI", BaseUI)
local BTN_WIDTH = 82
local BTN_RIGHT = 20
local BTN_SPACING = 26
function ActSprintMainUI:showCommonBG()
return false
end
function ActSprintMainUI:onPressBackspace()
self:closeUI()
end
function ActSprintMainUI:getPrefabPath()
return "assets/prefabs/ui/activity/act_sprint/act_sprint_main_ui_1_all.prefab"
end
function ActSprintMainUI:onClose()
if self.subComps then
for _, comp in pairs(self.subComps) do
if comp.onClose then
comp:onClose()
end
end
end
local callback = self.callback
self.callback = nil
if callback then
callback()
end
end
function ActSprintMainUI:currencyParams()
self.params = {}
self.params.showType = GConst.CURRENCY_TYPE.HORIZONTAL
if self.curPage == 3 then
self.params.itemIds = {
GConst.ItemConst.ITEM_ID_GEM,
}
else
self.params.itemIds = {}
end
return self.params, true
end
function ActSprintMainUI:ctor(params)
self.params = params or {}
self.actId = params.actId
self.curPage = params.page or self:getRpPage()
end
function ActSprintMainUI:onLoadRootComplete()
if not self.actId then
self:closeUI()
return
end
local uiMap = self.root:genAllChildren()
self.btnClose = uiMap["act_sprint_main_ui.bottom.btn_close"]
self.btnNode = uiMap["act_sprint_main_ui.bottom.btns"]
self.btnContent = uiMap["act_sprint_main_ui.bottom.btns.viewport.content"]
self.btns = {}
self.txBtns = {}
for i = 1, 4 do
table.insert(self.btns, uiMap["act_sprint_main_ui.bottom.btns.viewport.content.btn_" .. i])
table.insert(self.txBtns, uiMap["act_sprint_main_ui.bottom.btns.viewport.content.btn_" .. i .. ".tx_desc"])
end
self.compsRoot = uiMap["act_sprint_main_ui.comps"]
for i, btn in ipairs(self.btns) do
btn:addClickListener(function()
self:onChangePage(i)
end)
end
self.txBtns[1]:setText(I18N:getGlobalText(I18N.GlobalConst[GConst.ActSprintConst.MAIN_PAGE_BTN_DESC[GConst.ActSprintConst.MAIN_PAGE_TYPE.STANDARD]]))
self.txBtns[2]:setText(I18N:getGlobalText(I18N.GlobalConst[GConst.ActSprintConst.MAIN_PAGE_BTN_DESC[GConst.ActSprintConst.MAIN_PAGE_TYPE.LOGIN]]))
self.txBtns[3]:setText(I18N:getGlobalText(I18N.GlobalConst[GConst.ActSprintConst.MAIN_PAGE_BTN_DESC[GConst.ActSprintConst.MAIN_PAGE_TYPE.GIFT]]))
self.txBtns[4]:setText(I18N:getGlobalText(I18N.GlobalConst[GConst.ActSprintConst.MAIN_PAGE_BTN_DESC[GConst.ActSprintConst.MAIN_PAGE_TYPE.TASK]]))
self:initComps()
self:scheduleGlobal(function()
self:updateTime()
end, 1)
self:updateTime()
self.btnClose:addClickListener(function()
self:closeUI()
end)
self:bind(DataManager.ActSprintSummonDataAll, "isDirty", function()
self:refreshRedPoint()
self:onRefresh()
end)
self:bind(DataManager.ActivityData, "isDirty", function()
self:refreshRedPoint()
self:onRefresh()
end)
self:bind(DataManager.PaymentData, "isDirty", function()
self:refreshRedPoint()
self:onRefresh()
end)
self:bind(DataManager.ActTaskData, "isDirty", function()
self:refreshRedPoint()
self:onRefresh()
end)
self:addEventListener(EventManager.CUSTOM_EVENT.CHANGE_MAIN_CITY_PAGE, function()
self:closeUI()
end)
self:refreshRedPoint()
self:onRefresh()
BIReportV2:postOperation(BIReportV2.OPERATION_UI_NAME.ACT_SPRINT_NEW_SUMMON)
end
function ActSprintMainUI:initComps()
if self.subComps then
return
end
local uiMap = self.root:genAllChildren()
self.subComps = {}
-- 预制体挂载
local obj = uiMap["act_sprint_main_ui.standard_comp"]
obj:initPrefabHelper()
obj:genAllChildren()
local comp = obj:addLuaComponent("app/ui/activity/act_sprint_summon_all/comp/standard_comp")
self.subComps[1] = comp
local obj2 = uiMap["act_sprint_main_ui.login_comp"]
obj2:initPrefabHelper()
obj2:genAllChildren()
self.subComps[2] = obj2:addLuaComponent("app/ui/activity/act_sprint_summon_all/comp/login_comp")
local obj3 = uiMap["act_sprint_main_ui.gift_comp"]
obj3:initPrefabHelper()
obj3:genAllChildren()
self.subComps[3] = obj3:addLuaComponent("app/ui/activity/act_sprint_summon_all/comp/gift_comp")
local obj4 = uiMap["act_sprint_main_ui.task_comp"]
obj4:initPrefabHelper()
obj4:genAllChildren()
self.subComps[4] = obj4:addLuaComponent("app/ui/activity/act_sprint_summon_all/comp/task_comp")
end
function ActSprintMainUI:updateTime()
if self.subComps then
for _, comp in pairs(self.subComps) do
if comp.updateTime then
comp:updateTime(self.actId)
end
end
end
if not DataManager.ActSprintSummonDataAll:getIsOpen() then
self:closeUI()
end
end
function ActSprintMainUI:onChangePage(page)
if self.curPage == page then
return
end
for i, comp in pairs(self.subComps) do
if page ~= i and self.curPage == i and comp.onClose then
comp:onClose()
end
end
self.curPage = page
self:onRefresh()
end
function ActSprintMainUI:onRefresh()
local openCount = 0
for i, btn in ipairs(self.btns) do
if self:isOpen(i) then
btn:setActive(true)
openCount = openCount + 1
if self.curPage == i then
btn:setSprite(GConst.ATLAS_PATH.UI_ACT_COMMON, GConst.ActSprintConst.MAIN_PAGE_BTN_ICON_1[self.actId][i])
else
btn:setSprite(GConst.ATLAS_PATH.UI_ACT_COMMON, GConst.ActSprintConst.MAIN_PAGE_BTN_ICON_2[self.actId][i])
end
else
btn:setActive(false)
end
end
local width = BTN_RIGHT + BTN_WIDTH * openCount + BTN_SPACING * (openCount - 1) + 20
self.btnContent:setSizeDeltaX(width)
self.btnContent:setAnchoredPositionX(math.max(width - self.btnNode:getSizeDeltaX(), 0))
for i, comp in pairs(self.subComps) do
if self.curPage == i then
comp:getBaseObject():setActive(true)
comp:refresh(self.actId)
else
comp:getBaseObject():setActive(false)
end
end
self:updateCurrencyBar()
-- 红点
self:refreshRedPoint()
end
function ActSprintMainUI:refreshRedPoint()
for i, btn in ipairs(self.btns) do
if self:hasRedPoint(i) then
btn:addRedPoint(30, 30, 0.9)
else
btn:removeRedPoint()
end
end
end
function ActSprintMainUI:isOpen(type)
return true
end
function ActSprintMainUI:hasRedPoint(page)
if page == 1 then
return DataManager.ActSprintSummonDataAll:hasStandardRp()
elseif page == 2 then
return DataManager.ActSprintSummonDataAll:hasBountyRp()
elseif page == 3 then
return DataManager.ActSprintSummonDataAll:hasGiftRp()
elseif page == 4 then
return DataManager.ActSprintSummonDataAll:hasTaskRp()
end
return false
end
function ActSprintMainUI:getRpPage()
for i = 1, 4 do
if self:hasRedPoint(i) then
return i
end
end
return 1
end
return ActSprintMainUI

View File

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: 48fc395edac664a4da2ccdaf9696b5a0
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -1,40 +0,0 @@
local GiftComp = class("GiftComp", LuaComponent)
local CELL = "app/ui/activity/act_sprint_summon_all/cell/gift_cell"
function GiftComp:init()
local uiMap = self:getUIMap()
self.banner = uiMap["gift_comp.bg.banner"]
self.txTitle = uiMap["gift_comp.top.title_tx"]
self.txTime = uiMap["gift_comp.top.time_bg.time_tx"]
self.scrollrect = uiMap["gift_comp.scrollrect"]
end
function GiftComp:refresh(actId)
self.txTitle:setText(I18N:getGlobalText(GConst.ActSprintConst.ACT_LIST_NAME[actId]))
self.banner:setTexture(GConst.ActSprintConst.ACT_MAIN_BANNER[actId])
self.giftList = DataManager.ActGiftData:getGiftIdsSort(actId)
if self.scrollRect == nil then
self.scrollRect = self.scrollrect:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE)
self.scrollRect:addInitCallback(function()
return CELL
end)
self.scrollRect:addRefreshCallback(function(index, cell)
cell:refresh(actId, self.giftList[index])
end)
end
if self.scrollRect:getTotalCount() == nil or self.scrollRect:getTotalCount() <= 0 then
self.scrollRect:refillCells(#self.giftList)
elseif self.scrollRect:getTotalCount() ~= #self.giftList then
self.scrollRect:clearCells()
self.scrollRect:refillCells(#self.giftList)
else
self.scrollRect:updateAllCell()
end
end
function GiftComp:updateTime()
self.txTime:setText(Time:formatNumTimeStr(DataManager.ActSprintSummonDataAll:getRemainTime()))
end
return GiftComp

View File

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: 179f9ae95bad42a408979f724a68060b
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -1,81 +0,0 @@
local SummonActLogin = class("SummonActLogin", LuaComponent)
local CELL = "app/ui/activity/act_sprint_summon_all/cell/login_cell"
function SummonActLogin:onClose()
end
function SummonActLogin:init()
local uiMap = self:getUIMap()
self.txTitle = uiMap["login_comp.top.title_tx"]
self.txTime = uiMap["login_comp.top.time_bg.time_tx"]
self.banner = uiMap["login_comp.top.banner"]
self.scrollrectPrefab = uiMap["login_comp.scrollrect"]
self.scrollrect = self.scrollrectPrefab:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE)
self.getBtn = uiMap["login_comp.get_btn"]
self.getBtn:addClickListener(function()
local actId = DataManager.ActSprintSummonDataAll:getActId()
local actType = DataManager.ActSprintSummonDataAll:getActType(actId)
local grade = DataManager.ActSprintSummonDataAll:isUnlockBountyPro() and 1 or 0
ModuleManager.ActSprintManager:reqSprintBountySign(actType, actId, grade)
end)
self.getBtnTx = uiMap["login_comp.get_btn.text"]
self.getBtnTx:setText(I18N:getGlobalText(I18N.GlobalConst.ONE_KEY_GET_DESC))
self.payBtn = uiMap["login_comp.pay_btn"]
self.payBtn:addClickListener(function()
if DataManager.ActSprintSummonDataAll:isUnlockBountyPro() then
return
end
local giftId = DataManager.ActSprintSummonDataAll:getBountyProGiftId()
ModuleManager.ActSprintManager:onBuyBountyPro(giftId)
end)
self.payBtnTx = uiMap["login_comp.pay_btn.text"]
uiMap["login_comp.scrollrect.title.tx_scro_title_1"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_HERO_SUIT_DESC_4))
uiMap["login_comp.scrollrect.title.tx_scro_title_2"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_HERO_SUIT_DESC_5))
uiMap["login_comp.scrollrect.title.tx_scro_title_3"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_HERO_SUIT_DESC_6))
end
--endregion
--region基础初始化方法
function SummonActLogin:updateTime()
self.txTime:setText(Time:formatNumTimeStr(DataManager.ActSprintSummonDataAll:getRemainTime()))
end
function SummonActLogin:refresh()
local actId = DataManager.ActSprintSummonDataAll:getActId()
self.txTitle:setText(I18N:getGlobalText(GConst.ActSprintConst.ACT_LIST_NAME[actId]))
self.banner:setTexture(GConst.ActSprintConst.ACT_MAIN_BANNER[actId])
self.getBtn:setActive(DataManager.ActSprintSummonDataAll:isHaveUnclaimedBountyReward())
self.payBtn:setActive(not DataManager.ActSprintSummonDataAll:isUnlockBountyPro())
local rechargeId = DataManager.ActSprintSummonDataAll:getBountyProRechargeId()
self.payBtnTx:setText(GFunc.getFormatPrice(rechargeId))
self:refreshScrollRect()
end
function SummonActLogin:refreshScrollRect()
self.cfgList = DataManager.ActSprintSummonDataAll:getBountyCfgList()
if not self.isInitScrollrect then
self.isInitScrollrect = true
self.scrollrect:addInitCallback(function()
return CELL
end)
self.scrollrect:addRefreshCallback(function(index, cell)
cell:refresh(index, #self.cfgList, self.cfgList[index])
end)
self.scrollrect:clearCells()
self.scrollrect:refillCells(#self.cfgList)
else
if self.scrollrect:getTotalCount() == #self.cfgList then
self.scrollrect:updateAllCell()
else
self.scrollrect:refillCells(#self.cfgList)
end
end
-- local minIndex = self.dataManager:getMinUnclaimedRewardIndex()
-- self.scrollrect:moveToIndex(minIndex)
end
--endregion
return SummonActLogin

View File

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: 8c51d0d3dc469e64a9480443efbe5eb4
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -1,101 +0,0 @@
local StandardComp = class("StandardComp", LuaComponent)
local REWARD_CELL_COUNT = 3
local CELL = "app/ui/activity/act_sprint_summon_all/cell/standard_cell"
function StandardComp:init()
local uiMap = self:getUIMap()
self.banner = uiMap["standard_comp.bg.banner"]
self.txTitle = uiMap["standard_comp.top.title_tx"]
self.txTitle2 = uiMap["standard_comp.top.title_2_tx"]
self.txDesc = uiMap["standard_comp.top.turn_bg.desc_tx"]
self.txTime = uiMap["standard_comp.top.time_bg.time_tx"]
self.goBtn = uiMap["standard_comp.top.go_bg"]
self.goTx = uiMap["standard_comp.top.go_bg.desc_tx"]
self.getBtn = uiMap["standard_comp.top.turn_reward_bg.get_btn"]
self.getTx = uiMap["standard_comp.top.turn_reward_bg.get_btn.tx"]
self.helpBtn = uiMap["standard_comp.top.title_tx.btn_help"]
if not self.rewardList then
self.rewardList = {}
for i = 1, REWARD_CELL_COUNT do
table.insert(self.rewardList, CellManager:addCellComp(uiMap["standard_comp.top.reward_cell_" .. i], GConst.TYPEOF_LUA_CLASS.REWARD_CELL))
end
end
self.rewardDescTx = uiMap["standard_comp.top.turn_reward_bg.desc_tx"]
self.scrollrect = uiMap["standard_comp.scrollrect"]
end
function StandardComp:refresh(actId)
local turn = DataManager.ActTaskData:getTurnScore(actId)
local maxTurn = DataManager.ActTaskData:getMaxTurnScore(actId)
local canGetTurnReward = DataManager.ActTaskData:getCanGetTurnRewardScore(actId)
local gotAllTurnReward = DataManager.ActTaskData:getGotAllTurnRewardScore(actId)
-- 轮次奖励
local rewards = DataManager.ActTaskData:getRewardsgetMaxTurnScore(actId)
for i = 1, REWARD_CELL_COUNT do
local reward = rewards and rewards[i]
if reward then
self.rewardList[i].baseObject:setActive(true)
if gotAllTurnReward then
self.rewardList[i]:refreshByConfig(reward, true, true)
self.rewardList[i]:hideFrameAnimation()
else
self.rewardList[i]:refreshByConfig(reward)
if canGetTurnReward then
self.rewardList[i]:showFrameAnimation()
self.rewardList[i]:addClickListener(function()
ModuleManager.ActSprintManager:reqStandardReward(actId)
end)
else
self.rewardList[i]:hideFrameAnimation()
end
end
else
self.rewardList[i].baseObject:setActive(false)
end
end
self.rewardDescTx:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_GOGOGO_DESC_12))
self.banner:setTexture(GConst.ActSprintConst.ACT_MAIN_BANNER[actId])
self.txTitle:setText(I18N:getGlobalText(GConst.ActSprintConst.ACT_LIST_NAME[actId]))
self.txTitle2:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_GOGOGO_DESC_19))
self.txDesc:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_GOGOGO_DESC_9) .. "(" .. (turn >= maxTurn and maxTurn or (turn + 1)) .. "/" .. maxTurn .. ")")
self.txTime:setText(Time:formatNumTimeStr(DataManager.ActSprintSummonDataAll:getRemainTime()))
self.goTx:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_GOGOGO_DESC_14))
self.goBtn:addClickListener(function()
EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.CHANGE_MAIN_CITY_PAGE, {page = GConst.MainCityConst.BOTTOM_PAGE.MAIN})
ModuleManager.SummonManager:showSummonMainUI()
end)
self.getBtn:setActive(false)
self.helpBtn:addClickListener(function()
local params = {}
params.desc = I18N:getGlobalText(I18N.GlobalConst.ACT_GOGOGO_DESC_17)
ModuleManager.TipsManager:showHelpTips(params)
end)
-- 滑动窗
self.standardList = DataManager.ActTaskData:getActTaskListScore(actId)
if self.scrollRect == nil then
self.scrollRect = self.scrollrect:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE)
self.scrollRect:addInitCallback(function()
return CELL
end)
self.scrollRect:addRefreshCallback(function(index, cell)
cell:refresh(actId, self.standardList[index])
end)
end
if self.scrollRect:getTotalCount() == nil or self.scrollRect:getTotalCount() <= 0 then
self.scrollRect:refillCells(#self.standardList)
elseif self.scrollRect:getTotalCount() ~= #self.standardList then
self.scrollRect:clearCells()
self.scrollRect:refillCells(#self.standardList)
else
self.scrollRect:updateAllCell()
end
end
function StandardComp:updateTime()
self.txTime:setText(Time:formatNumTimeStr(DataManager.ActSprintSummonDataAll:getRemainTime()))
end
return StandardComp

View File

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: dfb4b457808240949843517d59105702
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -1,41 +0,0 @@
local TaskComp = class("TaskComp", LuaComponent)
local CELL = "app/ui/activity/act_sprint_summon_all/cell/task_cell"
function TaskComp:init()
local uiMap = self:getUIMap()
self.banner = uiMap["task_comp.bg.banner"]
self.txTitle = uiMap["task_comp.top.title_tx"]
self.txTime = uiMap["task_comp.top.time_bg.time_tx"]
self.scrollrect = uiMap["task_comp.scrollrect"]
end
function TaskComp:refresh(actId)
self.txTitle:setText(I18N:getGlobalText(GConst.ActSprintConst.ACT_LIST_NAME[actId]))
self.banner:setTexture(GConst.ActSprintConst.ACT_MAIN_BANNER[actId])
self.taskList = DataManager.ActTaskData:getTaskSortList(actId)
if self.scrollRect == nil then
self.scrollRect = self.scrollrect:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE)
self.scrollRect:addInitCallback(function()
return CELL
end)
self.scrollRect:addRefreshCallback(function(index, cell)
cell:refresh(actId, self.taskList[index].id)
end)
end
if self.scrollRect:getTotalCount() == nil or self.scrollRect:getTotalCount() <= 0 then
self.scrollRect:refillCells(#self.taskList)
elseif self.scrollRect:getTotalCount() ~= #self.taskList then
self.scrollRect:clearCells()
self.scrollRect:refillCells(#self.taskList)
else
self.scrollRect:updateAllCell()
end
end
function TaskComp:updateTime(actId)
self:refresh(actId)
self.txTime:setText(Time:formatNumTimeStr(DataManager.ActSprintSummonDataAll:getRemainTime()))
end
return TaskComp

View File

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: c132ed2b81e467745ac7ee7bd2e8b83f
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d11c359242fdf42ea8551a54c95e0f94
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,313 @@
local ActBaseUI = class("ActBaseUI", BaseUI)
function ActBaseUI:ctor(params)
self.page = params.page or 1
self.ActConst = self:getActConst()
end
function ActBaseUI:onClose()
if self.subComps then
for _, comp in pairs(self.subComps) do
if comp.onClose then
comp:onClose()
end
end
end
self.subComps = nil
end
function ActBaseUI:onLoadRootComplete()
self:_display()
self:_addListeners()
self:_bind()
self:initComps()
self:updateCurrencyBar()
self:scheduleGlobal(function()
self:updateTime()
end, 0)
self:updateTime()
end
function ActBaseUI:_display()
local uiMap = self.root:genAllChildren()
self.compsRoot = uiMap["act_main_ui.sub_comps"]
self.closeBtn = uiMap["act_main_ui.bottom.close_btn"]
-- self.titleBg = uiMap["act_main_ui.title_bg"]
self.titleTx = uiMap["act_main_ui.top.title_tx"]
self.helpBtn = uiMap["act_main_ui.title_bg.help_btn"]
self.timeTx = uiMap["act_main_ui.top.time_bg.time_tx"]
self.pageBtnsCompObj = uiMap["act_main_ui.bottom.page_btns_comp"]
self.disableBg = uiMap["act_main_ui.disable_bg"]
self.disableBg:setActive(false)
self.pageBtns = {}
for k, idx in pairs(self:getActConst().BOTTOM_PAGE) do
self.pageBtns[idx] = uiMap["act_main_ui.bottom.btns.viewport.content.page_btn_" .. idx]
uiMap["act_main_ui.bottom.btns.viewport.content.page_btn_" .. idx .. ".text"]:setText(self:getCellName(idx))
end
end
function ActBaseUI:_addListeners()
self.closeBtn:addClickListener(function()
self:closeUI()
end)
if self.helpBtn then
self.helpBtn:addClickListener(function()
if self.getHelpStr then
local params = {}
params.desc = self:getHelpStr()
ModuleManager.TipsManager:showHelpTips(params)
end
end)
end
for i, btn in ipairs(self.pageBtns) do
btn:addClickListener(function()
self:refreshPage(i)
end, GConst.CLICK_SOUND.NONE)
end
self:addEventListener(EventManager.CUSTOM_EVENT.CHANGE_MAIN_CITY_PAGE, function(params)
if not self:isClosed() then
self:closeUI()
end
end)
-- self:addEventListener(EventManager.CUSTOM_EVENT.ACT_GAME_OPT, function(params)
-- if self.subComps[self:getActConst().BOTTOM_PAGE.GAME] then
-- self.subComps[self:getActConst().BOTTOM_PAGE.GAME]:settlementGame()
-- end
-- self:refreshPageBtns()
-- end)
-- self:addEventListener(EventManager.CUSTOM_EVENT.ACT_TURNTABLE, function(params)
-- if not self:isClosed() and self.page == self:getActConst().BOTTOM_PAGE.TURNTABLE then
-- self.subComps[self.page]:playAni(params)
-- end
-- end)
-- self:addEventListener(EventManager.CUSTOM_EVENT.ACT_BIG_REWARD_SHOW, function(params)
-- if self:isClosed() then
-- return
-- end
-- if self.page ~= self:getActConst().BOTTOM_PAGE.TURNTABLE then
-- return
-- end
-- local rewards = DataManager[self:getActDataType()]:getBigRewards()
-- if rewards == nil or #rewards == 0 then
-- return
-- end
-- ModuleManager.ActivityManager:showBigRewardUI(self, rewards)
-- end)
-- self:addEventListener(EventManager.CUSTOM_EVENT.ACT_TRIGGER_GIFT, function()
-- if not self:isClosed() and self.page == self:getActConst().BOTTOM_PAGE.TURNTABLE then
-- self.subComps[self.page]:updateTriggerGift()
-- end
-- end)
-- self:addEventListener(EventManager.CUSTOM_EVENT.ACT_TURNTABLE_RESET, function()
-- if not self:isClosed() and self.page == self:getActConst().BOTTOM_PAGE.TURNTABLE then
-- self.subComps[self.page]:updateTurntable()
-- end
-- end)
self:addEventListener(EventManager.CUSTOM_EVENT.CHANGE_ACTIVITY_PAGE, function(params)
self:refreshPage(params)
end)
end
function ActBaseUI:_bind()
self:bind(DataManager.PaymentData, "isDirty", function()
self.subComps[self.page]:refresh(self, self:getActDataType())
self:onRefresh()
end)
self:bind(DataManager.ActivityData, "isDirty", function()
self.subComps[self.page]:refresh(self, self:getActDataType())
self:onRefresh()
end)
-- self:bind(DataManager.ActBountyData, "isDirty", function()
-- self.subComps[self.page]:refresh(self, self:getActDataType())
-- self:onRefresh()
-- end)
self:bind(DataManager.ActTaskData, "isDirty", function()
self.subComps[self.page]:refresh(self, self:getActDataType())
self:onRefresh()
end)
self:bind(DataManager[self:getActDataType()], "isDirty", function()
if self.page == self:getActConst().BOTTOM_PAGE.GAME then
self.subComps[self.page]:refreshStepRewardScrollrect()
else
self.subComps[self.page]:refresh(self, self:getActDataType())
end
self:refreshPageBtns()
end)
self:bind(DataManager.ActTaskData, "isDirty", function()
self:refreshPageBtns()
end)
end
function ActBaseUI:refreshPage(page)
-- if self.page == page then
-- return
-- end
self.page = page
self:onRefresh()
end
function ActBaseUI:initComps()
if self.subComps then
return
end
local uiMap = self.root:genAllChildren()
self.subComps = {}
for k, id in pairs(self:getActConst().BOTTOM_PAGE) do
if self:getActConst().COMP_NAME[id] then
-- 预制体挂载
self.subComps[id] = CellManager:addCellComp(uiMap[self:getActConst().COMP_NAME[id]], self:getActConst().COMP[id])
if self.subComps[id].setParentUI then
self.subComps[id]:setParentUI(self, self:getActDataType())
end
elseif self:getActConst().COMP_PATH[id] then
-- 动态加载
self:loadModule(self:getActConst().COMP_PATH[id], self.compsRoot, self:getActConst().COMP[id], function(comp)
if self.subComps == nil then
return
end
comp:getBaseObject():setActive(false)
self.subComps[id] = comp
if self.subComps[id].setParentUI then
self.subComps[id]:setParentUI(self, self:getActDataType())
end
end)
end
end
if self:getActConst().BOTTOM_PAGE.GAME then
local order = self._baseRootCanvas.sortingOrder
self.subComps[self:getActConst().BOTTOM_PAGE.GAME]:getBaseObject():setActive(true)
local uiHelper = self.subComps[self:getActConst().BOTTOM_PAGE.GAME]:getGameObject():GetComponent(GConst.TYPEOF_UNITY_CLASS.BF_UI_HELPER)
if uiHelper then
uiHelper:SetSortingOrder(order + 1)
end
end
end
function ActBaseUI:updateTime()
if DataManager[self:getActDataType()]:getRemainTime() <= 0 then
self:closeUI()
return
end
local remainTime = DataManager[self:getActDataType()]:getRemainTime()
if self.cacheRemainTime ~= remainTime then
self.cacheRemainTime = remainTime
if remainTime > 0 then
self.timeTx:setText(I18N:getGlobalText(I18N.GlobalConst.TIME_END_DESC_1, Time:formatNumTimeStr(remainTime)))
end
end
for i,v in ipairs(self.subComps) do
if v.updateTime then
v:updateTime()
end
end
if self.subComps[self:getActConst().BOTTOM_PAGE.TURNTABLE] and self.subComps[self:getActConst().BOTTOM_PAGE.TURNTABLE].updateAni then
self.subComps[self:getActConst().BOTTOM_PAGE.TURNTABLE]:updateAni()
end
end
function ActBaseUI:onRefresh()
if not DataManager[self:getActDataType()]:getIsOpen() then
return
end
self:refreshPanel()
self:refreshPageBtns()
-- self.titleBg:setActive(self.page == self:getActConst().BOTTOM_PAGE.TURNTABLE)
self.titleTx:setText(self:getCellName(self.page))
if self.helpBtn then
self.helpBtn:setActive(self.page == self:getActConst().BOTTOM_PAGE.GAME)
end
end
function ActBaseUI:refreshPanel()
if self.subComps == nil then
return
end
for i, comp in ipairs(self.subComps) do
comp.baseObject:setActive(i == self.page)
if i == self.page then
comp:refresh(self, self:getActDataType())
end
end
end
function ActBaseUI:refreshPageBtns()
if self.pageBtnInfos == nil then
self.pageBtnInfos = {}
for k, idx in pairs(self:getActConst().BOTTOM_PAGE) do
self.pageBtnInfos[idx] = {}
end
end
for k, idx in pairs(self:getActConst().BOTTOM_PAGE) do
local atlas = GConst.ATLAS_PATH.UI_ACT_COMMON
local icon = self:getPageBtnName(idx, self.page == idx)
local desc = self:getCellName(idx)
local redPoint = DataManager[self:getActDataType()]:getRpByPage(idx)
local callback = function()
self:refreshPage(idx)
end
self.pageBtnInfos[idx].atlas = atlas
self.pageBtnInfos[idx].icon = icon
self.pageBtnInfos[idx].desc = desc
self.pageBtnInfos[idx].redPoint = redPoint
self.pageBtnInfos[idx].callback = callback
end
if self.pageBtnsCompObj then
self.pageBtnsComp = self.pageBtnsCompObj:addLuaComponent(GConst.TYPEOF_LUA_CLASS.PAGE_BTNS_COMP)
self.pageBtnsComp:refresh(self.pageBtnInfos)
end
for i, btn in ipairs(self.pageBtns) do
btn:setActive(self.pageBtnsComp == nil)
local atlas = GConst.ATLAS_PATH.UI_ACT_COMMON
if self.page == i then
btn:setSprite(atlas, self:getPageBtnName(i, true))
else
btn:setSprite(atlas, self:getPageBtnName(i, false))
end
if DataManager[self:getActDataType()]:getRpByPage(i) then
btn:addRedPoint(32, 20, 1)
else
btn:removeRedPoint()
end
end
self:updateCurrencyBar()
end
function ActBaseUI:disableUITouchSelf()
self.disableBg:setActive(true)
end
function ActBaseUI:enableUITouchSelf()
self.disableBg:setActive(false)
end
function ActBaseUI:showTitle(show)
self.titleBg:setActive(show)
end
function ActBaseUI:showHelp(show)
self.helpBtn:setActive(show)
end
return ActBaseUI

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: ce95387387faadd4b8e34476e0a4a7df guid: fd5fa094182204516b79faa9a691a244
ScriptedImporter: ScriptedImporter:
internalIDToNameTable: [] internalIDToNameTable: []
externalObjects: {} externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 3badef5720aa26742a9d6e505bd0b80e guid: ab77b2271d1b244cbbbe384dc87f447b
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

@ -1,6 +1,6 @@
local SummonActCell = class("SummonActCell", BaseCell) local ActBountyCellV1 = class("ActBountyCellV1", BaseCell)
function SummonActCell:init() function ActBountyCellV1:init()
local uiMap = self:getUIMap() local uiMap = self:getUIMap()
self.dayIcon = uiMap["bounty_cell.day_icon"] self.dayIcon = uiMap["bounty_cell.day_icon"]
self.dayTx = uiMap["bounty_cell.day_icon.day_tx"] self.dayTx = uiMap["bounty_cell.day_icon.day_tx"]
@ -16,7 +16,7 @@ function SummonActCell:init()
self.proRewardCells[i] = uiMap["bounty_cell.reward_pro.reward_cell_" .. i]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) self.proRewardCells[i] = uiMap["bounty_cell.reward_pro.reward_cell_" .. i]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL)
end end
end end
function SummonActCell:refresh(day, maxDay, info) function ActBountyCellV1:refresh(day, maxDay, info)
local curDay = DataManager.ActSprintSummonDataAll:getBountyCurrDay() local curDay = DataManager.ActSprintSummonDataAll:getBountyCurrDay()
local freeGot = DataManager.ActSprintSummonDataAll:getHasGotBountyReward(0, day) local freeGot = DataManager.ActSprintSummonDataAll:getHasGotBountyReward(0, day)
local proGot = DataManager.ActSprintSummonDataAll:getHasGotBountyReward(1, day) local proGot = DataManager.ActSprintSummonDataAll:getHasGotBountyReward(1, day)
@ -83,11 +83,11 @@ function SummonActCell:refresh(day, maxDay, info)
end end
end end
function SummonActCell:onClickClaimRewards() function ActBountyCellV1:onClickClaimRewards()
local actId = DataManager.ActSprintSummonDataAll:getActId() local actId = DataManager.ActSprintSummonDataAll:getActId()
local actType = DataManager.ActivityData:getActType(actId) local actType = DataManager.ActivityData:getActType(actId)
local grade = DataManager.ActSprintSummonDataAll:isUnlockBountyPro() and 1 or 0 local grade = DataManager.ActSprintSummonDataAll:isUnlockBountyPro() and 1 or 0
ModuleManager.ActSprintManager:reqSprintBountySign(actType, actId, grade) ModuleManager.ActSprintManager:reqSprintBountySign(actType, actId, grade)
end end
return SummonActCell return ActBountyCellV1

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 5a3367bd1aee89d4f8df29c64f7e9685 guid: 5ce8b4d60daf2423789a32f157a2b2f2
ScriptedImporter: ScriptedImporter:
internalIDToNameTable: [] internalIDToNameTable: []
externalObjects: {} externalObjects: {}

View File

@ -1,4 +1,4 @@
local GiftCell = class("GiftCell", BaseCell) local ActGiftCellV1 = class("ActGiftCellV1", BaseCell)
local REWARD_CELL_COUNT = 3 local REWARD_CELL_COUNT = 3
local BG_NAME_1 = "act_common_bg_27" -- 售罄 local BG_NAME_1 = "act_common_bg_27" -- 售罄
@ -7,7 +7,7 @@ local BG_NAME_2 = "act_common_bg_28" -- 正常
local BTN_NAME_1 = "common_btn_grey_5" local BTN_NAME_1 = "common_btn_grey_5"
local BTN_NAME_2 = "common_btn_yellow_5" local BTN_NAME_2 = "common_btn_yellow_5"
function GiftCell:refresh(actId, actGiftId) function ActGiftCellV1:refresh(actId, actGiftId)
local uiMap = self:getUIMap() local uiMap = self:getUIMap()
local bg = uiMap["gift_cell.bg"] local bg = uiMap["gift_cell.bg"]
local descTx = uiMap["gift_cell.bg.desc_tx"] local descTx = uiMap["gift_cell.bg.desc_tx"]
@ -117,4 +117,4 @@ function GiftCell:refresh(actId, actGiftId)
end) end)
end end
return GiftCell return ActGiftCellV1

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: d5597e85c63eaf342b933c03bbf3cf7c guid: d997dbc05c6d246b4ab622b6b814bdc0
ScriptedImporter: ScriptedImporter:
internalIDToNameTable: [] internalIDToNameTable: []
externalObjects: {} externalObjects: {}

View File

@ -1,39 +1,30 @@
local StandardCell = class("StandardCell", BaseCell) local ActScoreTaskCellV1 = class("ActScoreTaskCellV1", BaseCell)
local REWARD_CELL_COUNT = 3 local REWARD_CELL_COUNT = 3
function StandardCell:refresh(actId, actTaskId) function ActScoreTaskCellV1:init()
local uiMap = self:getUIMap() local uiMap = self:getUIMap()
local bg = uiMap["standard_cell.bg"] self.descTx = uiMap["task_cell.bg.desc_tx"]
local descTx = uiMap["standard_cell.bg.desc_tx"] self.slider = uiMap["task_cell.bg.slider_bg.slider"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER)
if not self.slider then self.sliderTx = uiMap["task_cell.bg.slider_bg.slider_tx"]
self.slider = uiMap["standard_cell.bg.slider_bg.slider"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) self.rewardLayout = uiMap["task_cell.bg.rewards"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT)
self.rewardList = {}
for i = 1, REWARD_CELL_COUNT do
table.insert(self.rewardList, CellManager:addCellComp(uiMap["task_cell.bg.rewards.reward_cell_" .. i], GConst.TYPEOF_LUA_CLASS.REWARD_CELL))
end end
local sliderTx = uiMap["standard_cell.bg.slider_bg.tx"] end
if not self.rewardList then
self.rewardList = {}
for i = 1, REWARD_CELL_COUNT do
table.insert(self.rewardList, CellManager:addCellComp(uiMap["standard_cell.bg.reward_cell_" .. i], GConst.TYPEOF_LUA_CLASS.REWARD_CELL))
end
end
local rewardLayout = uiMap["standard_cell.bg.rewards"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT)
function ActScoreTaskCellV1:refresh(actId, actTaskId)
local num = DataManager.ActTaskData:getTaskNumScore(actId, actTaskId) local num = DataManager.ActTaskData:getTaskNumScore(actId, actTaskId)
local type = DataManager.ActTaskData:getTaskType(actTaskId) local type = DataManager.ActTaskData:getTaskType(actTaskId)
local limit = DataManager.ActTaskData:getTaskTarget(actTaskId) local limit = DataManager.ActTaskData:getTaskTarget(actTaskId)
local rewards = DataManager.ActTaskData:getTaskReward(actTaskId) local rewards = DataManager.ActTaskData:getTaskReward(actTaskId)
local hasGot = DataManager.ActTaskData:getHasGotTaskRewardScore(actId, actTaskId) local hasGot = DataManager.ActTaskData:getHasGotTaskRewardScore(actId, actTaskId)
local canGet = num >= limit and not hasGot local canGet = num >= limit and not hasGot
-- 修订 num = math.min(num, limit)
if num > limit then
num = limit
end
if hasGot then
num = limit
end
descTx:setText(GFunc.getTaskDesc(type, limit)) self.descTx:setText(GFunc.getTaskDesc(type, limit))
self.slider.value = num / limit self.slider.value = num / limit
sliderTx:setText(num .. "/" .. limit) self.sliderTx:setText(num .. "/" .. limit)
for i = 1, REWARD_CELL_COUNT do for i = 1, REWARD_CELL_COUNT do
local reward = rewards and rewards[i] local reward = rewards and rewards[i]
if reward then if reward then
@ -51,7 +42,7 @@ function StandardCell:refresh(actId, actTaskId)
self.rewardList[i].baseObject:setActive(false) self.rewardList[i].baseObject:setActive(false)
end end
end end
rewardLayout:RefreshLayout() self.rewardLayout:RefreshLayout()
end end
return StandardCell return ActScoreTaskCellV1

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 33b9c94c8bc5e41d590d6c5374e71089
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -1,7 +1,7 @@
local TaskCell = class("TaskCell", BaseCell) local ActTaskCellV1 = class("ActTaskCellV1", BaseCell)
local REWARD_CELL_COUNT = 1 local REWARD_CELL_COUNT = 1
function TaskCell:refresh(actId, actTaskId) function ActTaskCellV1:refresh(actId, actTaskId)
local uiMap = self:getUIMap() local uiMap = self:getUIMap()
local bg = uiMap["task_cell.bg"] local bg = uiMap["task_cell.bg"]
local descTx = uiMap["task_cell.bg.desc_tx"] local descTx = uiMap["task_cell.bg.desc_tx"]
@ -73,4 +73,4 @@ function TaskCell:refresh(actId, actTaskId)
end) end)
end end
return TaskCell return ActTaskCellV1

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: f4d1094a59d134a61a30e3fb96ba5a00
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: b984e5e58db26214e9e8c0bcfb43f0c8 guid: 69dd1296158324e85b356ff70401bb9a
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

@ -0,0 +1,71 @@
local ActBountyCompV1 = class("ActBountyCompV1", LuaComponent)
local CELL = "app/ui/activity/common/cell/act_bounty_cell_v1"
function ActBountyCompV1:init()
local uiMap = self:getUIMap()
-- self.txTitle = uiMap["act_bounty_comp_v1.top.title_tx"]
-- self.txTime = uiMap["act_bounty_comp_v1.top.time_bg.time_tx"]
-- self.banner = uiMap["act_bounty_comp_v1.top.banner"]
self.scrollrectPrefab = uiMap["act_bounty_comp_v1.scrollrect"]
self.scrollrect = self.scrollrectPrefab:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE)
self.getBtn = uiMap["act_bounty_comp_v1.get_btn"]
self.getBtn:addClickListener(function()
local actId = self.data:getActId()
local actType = self.data:getActType(actId)
local grade = self.data:isUnlockBountyPro() and 1 or 0
ModuleManager.ActSprintManager:reqSprintBountySign(actType, actId, grade)
end)
self.getBtnTx = uiMap["act_bounty_comp_v1.get_btn.text"]
self.getBtnTx:setText(I18N:getGlobalText(I18N.GlobalConst.ONE_KEY_GET_DESC))
self.payBtn = uiMap["act_bounty_comp_v1.pay_btn"]
self.payBtn:addClickListener(function()
if self.data:isUnlockBountyPro() then
return
end
local giftId = self.data:getBountyProGiftId()
ModuleManager.ActSprintManager:onBuyBountyPro(giftId)
end)
self.payBtnTx = uiMap["act_bounty_comp_v1.pay_btn.text"]
uiMap["act_bounty_comp_v1.scrollrect.title.level_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_HERO_SUIT_DESC_4))
uiMap["act_bounty_comp_v1.scrollrect.title.desc_tx_1"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_HERO_SUIT_DESC_5))
uiMap["act_bounty_comp_v1.scrollrect.title.desc_tx_2"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_HERO_SUIT_DESC_6))
self.scrollrect:addInitCallback(function()
return CELL
end)
self.scrollrect:addRefreshCallback(function(index, cell)
cell:refresh(index, #self.cfgList, self.cfgList[index])
end)
self.scrollrect:clearCells()
end
-- function ActBountyCompV1:updateTime()
-- self.txTime:setText(Time:formatNumTimeStr(self.data:getRemainTime()))
-- end
function ActBountyCompV1:setParentUI(parentUI, dataKey)
self.parentUI = parentUI
self.dataKey = dataKey
self.data = DataManager[dataKey]
end
function ActBountyCompV1:refresh()
local actId = self.data:getActId()
-- self.txTitle:setText(I18N:getGlobalText(GConst.ActSprintConst.ACT_LIST_NAME[actId]))
-- self.banner:setTexture(GConst.ActSprintConst.ACT_MAIN_BANNER[actId])
self.getBtn:setActive(self.data:isHaveUnclaimedBountyReward())
self.payBtn:setActive(not self.data:isUnlockBountyPro())
local rechargeId = self.data:getBountyProRechargeId()
self.payBtnTx:setText(GFunc.getFormatPrice(rechargeId))
self:refreshScrollRect()
end
function ActBountyCompV1:refreshScrollRect()
self.cfgList = self.data:getBountyCfgList()
self.scrollrect:refillCells(#self.cfgList)
end
return ActBountyCompV1

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 0bd82003a833c4184aed7439b2839bc0
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,44 @@
local GiftCompV1 = class("GiftCompV1", LuaComponent)
local CELL = "app/ui/activity/common/cell/act_gift_cell_v1"
function GiftCompV1:init()
local uiMap = self:getUIMap()
-- self.banner = uiMap["gift_comp.bg.banner"]
-- self.txTitle = uiMap["gift_comp.top.title_tx"]
-- self.txTime = uiMap["gift_comp.top.time_bg.time_tx"]
self.scrollrect = uiMap["gift_comp.scrollrect"]
self.scrollRect = self.scrollrect:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE)
self.scrollRect:addInitCallback(function()
return CELL
end)
self.scrollRect:addRefreshCallback(function(index, cell)
cell:refresh(self.data:getActId(), self.giftList[index])
end)
end
function GiftCompV1:setParentUI(parentUI, dataKey)
self.parentUI = parentUI
self.dataKey = dataKey
self.data = DataManager[dataKey]
end
function GiftCompV1:refresh()
local actId = self.data:getActId()
-- self.txTitle:setText(I18N:getGlobalText(GConst.ActSprintConst.ACT_LIST_NAME[actId]))
-- self.banner:setTexture(GConst.ActSprintConst.ACT_MAIN_BANNER[actId])
self.giftList = DataManager.ActGiftData:getGiftIdsSort(actId)
if self.scrollRect:getTotalCount() == nil or self.scrollRect:getTotalCount() <= 0 then
self.scrollRect:refillCells(#self.giftList)
elseif self.scrollRect:getTotalCount() ~= #self.giftList then
self.scrollRect:clearCells()
self.scrollRect:refillCells(#self.giftList)
else
self.scrollRect:updateAllCell()
end
end
-- function GiftCompV1:updateTime()
-- self.txTime:setText(Time:formatNumTimeStr(DataManager.ActSprintSummonDataAll:getRemainTime()))
-- end
return GiftCompV1

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: e168e0ab54e114033b05bd855c7af7ac
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,108 @@
local ActScoreTaskCompV1 = class("ActScoreTaskCompV1", LuaComponent)
local REWARD_CELL_COUNT = 3
local CELL = "app/ui/activity/common/cell/act_score_task_cell_v1"
function ActScoreTaskCompV1:init()
local uiMap = self:getUIMap()
-- self.banner = uiMap["act_score_task_comp_v1.bg.banner"]
self.txTitle = uiMap["act_score_task_comp_v1.top.title_tx"]
self.txTitle2 = uiMap["act_score_task_comp_v1.top.desc_tx"]
self.txDesc = uiMap["act_score_task_comp_v1.top.turn_bg.desc_tx"]
self.txTime = uiMap["act_score_task_comp_v1.top.time_bg.time_tx"]
self.goBtn = uiMap["act_score_task_comp_v1.top.go_btn"]
self.goTx = uiMap["act_score_task_comp_v1.top.go_btn.text"]
self.getBtn = uiMap["act_score_task_comp_v1.top.turn_reward_bg.get_btn"]
self.getTx = uiMap["act_score_task_comp_v1.top.turn_reward_bg.get_btn.text"]
self.helpBtn = uiMap["act_score_task_comp_v1.top.title_tx.help_btn"]
if not self.rewardList then
self.rewardList = {}
for i = 1, REWARD_CELL_COUNT do
table.insert(self.rewardList, CellManager:addCellComp(uiMap["act_score_task_comp_v1.top.turn_reward_bg.reward_cell_" .. i], GConst.TYPEOF_LUA_CLASS.REWARD_CELL))
end
end
self.rewardDescTx = uiMap["act_score_task_comp_v1.top.turn_reward_bg.desc_tx"]
self.scrollrect = uiMap["act_score_task_comp_v1.scrollrect"]
end
function ActScoreTaskCompV1:setParentUI(parentUI, dataKey)
self.parentUI = parentUI
self.dataKey = dataKey
self.data = DataManager[dataKey]
end
function ActScoreTaskCompV1:refresh()
local actId = self.data:getActId()
local turn = DataManager.ActTaskData:getTurnScore(actId)
local maxTurn = DataManager.ActTaskData:getMaxTurnScore(actId)
local canGetTurnReward = DataManager.ActTaskData:getCanGetTurnRewardScore(actId)
local gotAllTurnReward = DataManager.ActTaskData:getGotAllTurnRewardScore(actId)
-- 轮次奖励
local rewards = DataManager.ActTaskData:getRewardsgetMaxTurnScore(actId)
for i = 1, REWARD_CELL_COUNT do
local reward = rewards and rewards[i]
if reward then
self.rewardList[i].baseObject:setActive(true)
if gotAllTurnReward then
self.rewardList[i]:refreshByConfig(reward, true, true)
self.rewardList[i]:hideFrameAnimation()
else
self.rewardList[i]:refreshByConfig(reward)
if canGetTurnReward then
self.rewardList[i]:showFrameAnimation()
self.rewardList[i]:addClickListener(function()
ModuleManager.ActSprintManager:reqStandardReward(actId)
end)
else
self.rewardList[i]:hideFrameAnimation()
end
end
else
self.rewardList[i].baseObject:setActive(false)
end
end
self.rewardDescTx:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_GOGOGO_DESC_12))
-- self.banner:setTexture(GConst.ActSprintConst.ACT_MAIN_BANNER[actId])
self.txTitle:setText(I18N:getGlobalText(GConst.ActSprintConst.ACT_LIST_NAME[actId]))
self.txTitle2:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_GOGOGO_DESC_19))
self.txDesc:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_GOGOGO_DESC_9) .. "(" .. (turn >= maxTurn and maxTurn or (turn + 1)) .. "/" .. maxTurn .. ")")
self.txTime:setText(Time:formatNumTimeStr(DataManager.ActSprintSummonDataAll:getRemainTime()))
self.goTx:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_GOGOGO_DESC_14))
self.goBtn:addClickListener(function()
EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.CHANGE_MAIN_CITY_PAGE, {page = GConst.MainCityConst.BOTTOM_PAGE.MAIN})
ModuleManager.SummonManager:showSummonMainUI()
end)
self.getBtn:setActive(false)
self.helpBtn:addClickListener(function()
local params = {}
params.desc = I18N:getGlobalText(I18N.GlobalConst.ACT_GOGOGO_DESC_17)
ModuleManager.TipsManager:showHelpTips(params)
end)
-- 滑动窗
self.standardList = DataManager.ActTaskData:getActTaskListScore(actId)
if self.scrollRect == nil then
self.scrollRect = self.scrollrect:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE)
self.scrollRect:addInitCallback(function()
return CELL
end)
self.scrollRect:addRefreshCallback(function(index, cell)
cell:refresh(actId, self.standardList[index])
end)
end
if self.scrollRect:getTotalCount() == nil or self.scrollRect:getTotalCount() <= 0 then
self.scrollRect:refillCells(#self.standardList)
elseif self.scrollRect:getTotalCount() ~= #self.standardList then
self.scrollRect:clearCells()
self.scrollRect:refillCells(#self.standardList)
else
self.scrollRect:updateAllCell()
end
end
function ActScoreTaskCompV1:updateTime()
self.txTime:setText(Time:formatNumTimeStr(self.data:getRemainTime()))
end
return ActScoreTaskCompV1

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: cd7be761f6df9492caad86e156477b67
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,46 @@
local TaskCompV1 = class("TaskCompV1", LuaComponent)
local CELL = "app/ui/activity/common/cell/act_task_cell_v1"
function TaskCompV1:init()
local uiMap = self:getUIMap()
-- self.banner = uiMap["task_comp.bg.banner"]
-- self.txTitle = uiMap["task_comp.top.title_tx"]
-- self.txTime = uiMap["task_comp.top.time_bg.time_tx"]
self.scrollrect = uiMap["task_comp.scrollrect"]
self.scrollRect = self.scrollrect:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE)
self.scrollRect:addInitCallback(function()
return CELL
end)
self.scrollRect:addRefreshCallback(function(index, cell)
cell:refresh(self.data:getActId(), self.taskList[index].id)
end)
end
function TaskCompV1:setParentUI(parentUI, dataKey)
self.parentUI = parentUI
self.dataKey = dataKey
self.data = DataManager[dataKey]
end
function TaskCompV1:refresh()
local actId = self.data:getActId()
-- self.txTitle:setText(I18N:getGlobalText(GConst.ActSprintConst.ACT_LIST_NAME[actId]))
-- self.banner:setTexture(GConst.ActSprintConst.ACT_MAIN_BANNER[actId])
self.taskList = DataManager.ActTaskData:getTaskSortList(actId)
if self.scrollRect:getTotalCount() == nil or self.scrollRect:getTotalCount() <= 0 then
self.scrollRect:refillCells(#self.taskList)
elseif self.scrollRect:getTotalCount() ~= #self.taskList then
self.scrollRect:clearCells()
self.scrollRect:refillCells(#self.taskList)
else
self.scrollRect:updateAllCell()
end
end
-- function TaskCompV1:updateTime(actId)
-- self:refresh(actId)
-- self.txTime:setText(Time:formatNumTimeStr(DataManager.ActSprintSummonDataAll:getRemainTime()))
-- end
return TaskCompV1

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 7d0ec30b8ad2e4b74ac719c3dc260289
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -710,25 +710,6 @@ function MainCityUI:checkMainPop()
-- ModuleManager.FullMoonManager:showActMainUI(showType) -- ModuleManager.FullMoonManager:showActMainUI(showType)
-- return -- return
-- end -- end
-- 金猪满了后下次进主城要弹出来
-- if DataManager.GoldPigData:getPopFlag() and not DataManager.TutorialData:getIsInTutorial() then
-- DataManager.GoldPigData:markPop()
-- local showType = BIReport.PAY_UI_SHOW_TYPE.TRIGGER_POP
-- if self.isFirstEnter then
-- showType = BIReport.PAY_UI_SHOW_TYPE.LOGIN_POP
-- end
-- ModuleManager.ActivityManager:showGoldPigUI(showType)
-- return
-- end
-- if DataManager.ActBossRushData:getIsOpen() and not DataManager.TutorialData:getIsInTutorial() then -- 弹窗
-- if not DataManager.ActBossRushData:getMarkPoped() then
-- if ModuleManager.ActBossRushManager:showPopUI() then
-- return
-- end
-- end
-- end
end end
-- 检查引导 -- 检查引导

View File

@ -256,10 +256,6 @@ function ActSprintSummonData:getIsShow()
return true return true
end end
function ActSprintSummonData:getActId()
return self.actId
end
function ActSprintSummonData:clearActId() function ActSprintSummonData:clearActId()
self.actId = nil self.actId = nil
end end
@ -363,6 +359,19 @@ function ActSprintSummonData:hasRedPoint()
return false return false
end end
function ActSprintSummonData:getRpByPage(page)
if page == 1 then
return self:hasStandardRp()
elseif page == 2 then
return self:hasBountyRp()
elseif page == 3 then
return self:hasGiftRp()
elseif page == 4 then
return self:hasTaskRp()
end
return false
end
function ActSprintSummonData:getActNameStr() function ActSprintSummonData:getActNameStr()
return I18N:getGlobalText(I18N.GlobalConst.ACT_GOGOGO_DESC_1) return I18N:getGlobalText(I18N.GlobalConst.ACT_GOGOGO_DESC_1)
end end

View File

@ -206,9 +206,6 @@ function PaymentData:updateGiftInfo(gift, rewards)
if giftType == PayManager.PURCHARSE_TYPE.SHOP_GEM then if giftType == PayManager.PURCHARSE_TYPE.SHOP_GEM then
DataManager.ShopData:setDirty() DataManager.ShopData:setDirty()
elseif giftType == PayManager.PURCHARSE_TYPE.ACT_GOLD_PIG then
BIReport:postGoldPigRewardOpt(DataManager.GoldPigData:getCacheInfo())
DataManager.GoldPigData:setBought()
elseif giftType == PayManager.PURCHARSE_TYPE.GIFT_ROUTINE then elseif giftType == PayManager.PURCHARSE_TYPE.GIFT_ROUTINE then
DataManager.GiftRoutineData:setDirty() DataManager.GiftRoutineData:setDirty()
elseif giftType == PayManager.PURCHARSE_TYPE.ACT_GIFT then elseif giftType == PayManager.PURCHARSE_TYPE.ACT_GIFT then