宝箱界面
This commit is contained in:
parent
dc095e626b
commit
aa18b68b20
@ -31,10 +31,12 @@ local MODULE_PATHS = {
|
||||
GameSettingManager = "app/module/game_setting/game_setting_manager",
|
||||
-- 活动
|
||||
ActivityManager = "app/module/activity/activity_manager",
|
||||
-- 商城,礼包
|
||||
-- 礼包
|
||||
CommerceManager = "app/module/commerce/commerce_manager",
|
||||
-- 战令
|
||||
BountyManager = "app/module/bounty/bounty_manager",
|
||||
-- 商店
|
||||
ShopManager = "app/module/shop/shop_manager",
|
||||
}
|
||||
|
||||
-- 这里的key对应func_open里的id
|
||||
|
||||
8
lua/app/module/shop.meta
Normal file
8
lua/app/module/shop.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dc36183384f4ab34eaf9aac204a93ee5
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
7
lua/app/module/shop/shop_manager.lua
Normal file
7
lua/app/module/shop/shop_manager.lua
Normal file
@ -0,0 +1,7 @@
|
||||
local ShopManager = class("ShopManager", BaseModule)
|
||||
|
||||
function ShopManager:showBoxHeroUI()
|
||||
UIManager:showUI("app/ui/shop/box_hero_ui")
|
||||
end
|
||||
|
||||
return ShopManager
|
||||
10
lua/app/module/shop/shop_manager.lua.meta
Normal file
10
lua/app/module/shop/shop_manager.lua.meta
Normal file
@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 808576e1b21d5d340b766ccf3ec71834
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}
|
||||
39
lua/app/ui/shop/box_hero_ui.lua
Normal file
39
lua/app/ui/shop/box_hero_ui.lua
Normal file
@ -0,0 +1,39 @@
|
||||
local BoxHeroUI = class("BoxHeroUI", BaseUI)
|
||||
|
||||
function BoxHeroUI:isFullScreen()
|
||||
return false
|
||||
end
|
||||
|
||||
function BoxHeroUI:getPrefabPath()
|
||||
return "assets/prefabs/ui/shop/box_hero_ui.prefab"
|
||||
end
|
||||
|
||||
function BoxHeroUI:onLoadRootComplete()
|
||||
self.uiMap = self.root:genAllChildren()
|
||||
self.uiMap["box_hero_ui.close_btn"]:addClickListener(function()
|
||||
self:closeUI()
|
||||
end)
|
||||
|
||||
self.titleTx = self.uiMap["box_hero_ui.bg.title"]
|
||||
self.boxImg = self.uiMap["box_hero_ui.bg.box"]
|
||||
|
||||
self.buyBtn = self.uiMap["box_hero_ui.bg.buy_btn"]
|
||||
self.buyBtnTx = self.uiMap["box_hero_ui.bg.buy_btn.text"]
|
||||
self.buyBtnIcon = self.uiMap["box_hero_ui.bg.buy_btn.icon"]
|
||||
self:initItems()
|
||||
end
|
||||
|
||||
function BoxHeroUI:initItems()
|
||||
self.items = {}
|
||||
for i = 1, 4 do
|
||||
local obj = {
|
||||
root = self.uiMap["box_hero_ui.bg.item_" .. i],
|
||||
cell = self.uiMap["box_hero_ui.bg.item_" .. i .. ".item_cell"],
|
||||
num = self.uiMap["box_hero_ui.bg.item_" .. i .. ".num"],
|
||||
help = self.uiMap["box_hero_ui.bg.item_" .. i .. ".help"],
|
||||
}
|
||||
self.items[i] = obj
|
||||
end
|
||||
end
|
||||
|
||||
return BoxHeroUI
|
||||
10
lua/app/ui/shop/box_hero_ui.lua.meta
Normal file
10
lua/app/ui/shop/box_hero_ui.lua.meta
Normal file
@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 25ac045a469b3854c9a8b5ff90fce9e6
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}
|
||||
@ -136,6 +136,8 @@ function TaskMainUI:initDailyTaskAdCell()
|
||||
local taskId = DataManager.DailyTaskData:getDailyTaskAdId()
|
||||
if DataManager.DailyTaskData:getDailyTaskCanClaimTask(taskId) then
|
||||
ModuleManager.TaskManager:claimDailyTask(taskId)
|
||||
else
|
||||
ModuleManager.ShopManager:showBoxHeroUI()
|
||||
end
|
||||
end)
|
||||
self.dailyTaskAdCellBoxInfo = self.uiMap["task_main_ui.bg.daily.task_ad_cell.box.info"]
|
||||
@ -150,6 +152,8 @@ function TaskMainUI:initDailyTaskFinalCell()
|
||||
local taskId = DataManager.DailyTaskData:getDailyTaskFinalId()
|
||||
if DataManager.DailyTaskData:getDailyTaskCanClaimTask(taskId) then
|
||||
ModuleManager.TaskManager:claimDailyTask(taskId)
|
||||
else
|
||||
ModuleManager.ShopManager:showBoxHeroUI()
|
||||
end
|
||||
end)
|
||||
self.dailyTaskFinalCellBoxInfo = self.uiMap["task_main_ui.bg.daily.task_final_cell.box.info"]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user