【云游商人】

dev_chengFeng
ZhangBiao 2021-04-17 14:01:12 +08:00
parent 07cda7e58e
commit e08a50f30c
7 changed files with 108 additions and 34 deletions

View File

@ -945,6 +945,7 @@ MonoBehaviour:
- Assets/ManagedResources/~Lua/Modules/Mission/Behaviour
- Assets/ManagedResources/~Lua/Modules/MonsterCamp
- Assets/ManagedResources/~Lua/Modules/Net
- Assets/ManagedResources/~Lua/Modules/NewActivity
- Assets/ManagedResources/~Lua/Modules/NiuQiChongTian
- Assets/ManagedResources/~Lua/Modules/NiuZhuanQianKun
- Assets/ManagedResources/~Lua/Modules/OnlineReward
@ -16903,6 +16904,14 @@ MonoBehaviour:
extension: .png
resPathIndex: 18
resAbNameIndex: 416
- resName: y_yosr_jiahao
extension: .png
resPathIndex: 18
resAbNameIndex: 416
- resName: y_yosr_wenhao
extension: .png
resPathIndex: 18
resAbNameIndex: 416
- resName: z_zhandou_denjjidi
extension: .png
resPathIndex: 18
@ -21003,7 +21012,7 @@ MonoBehaviour:
extension: .png
resPathIndex: 84
resAbNameIndex: 444
- resName: r_zjm_huodongicon-zhizunhaoli_zhi
- resName: r_zjm_huodongicon-zhizunhaoli_zh
extension: .png
resPathIndex: 84
resAbNameIndex: 444
@ -25975,6 +25984,14 @@ MonoBehaviour:
extension: .png
resPathIndex: 124
resAbNameIndex: 466
- resName: y_yosr_icon1_zh
extension: .png
resPathIndex: 124
resAbNameIndex: 466
- resName: y_yosr_icon2_zh
extension: .png
resPathIndex: 124
resAbNameIndex: 466
- resName: y_yueka_haohuayueka002_zh
extension: .png
resPathIndex: 124
@ -34135,6 +34152,10 @@ MonoBehaviour:
extension: .png
resPathIndex: 205
resAbNameIndex: 2335
- resName: y_yosr_banner_zh
extension: .png
resPathIndex: 205
resAbNameIndex: 2335
- resName: y_yuansu_dao01_zh
extension: .png
resPathIndex: 205
@ -37299,11 +37320,11 @@ MonoBehaviour:
extension: .png
resPathIndex: 362
resAbNameIndex: 2512
- resName: waixuan_UI
- resName: waixuan_UI_anim
extension: .anim
resPathIndex: 363
resAbNameIndex: 2513
- resName: waixuan_UI_anim
- resName: waixuan_UI_ctr
extension: .controller
resPathIndex: 363
resAbNameIndex: 2513
@ -44395,10 +44416,6 @@ MonoBehaviour:
extension: .png
resPathIndex: 406
resAbNameIndex: 2524
- resName: mask_018
extension: .jpg
resPathIndex: 406
resAbNameIndex: 2524
- resName: MK-008
extension: .png
resPathIndex: 406
@ -53263,6 +53280,10 @@ MonoBehaviour:
extension: .prefab
resPathIndex: 502
resAbNameIndex: 3197
- resName: CommonActPage
extension: .prefab
resPathIndex: 503
resAbNameIndex: 3198
- resName: EveryDayGift
extension: .prefab
resPathIndex: 503
@ -53271,6 +53292,10 @@ MonoBehaviour:
extension: .prefab
resPathIndex: 503
resAbNameIndex: 3198
- resName: ItemUpstarPre
extension: .prefab
resPathIndex: 503
resAbNameIndex: 3198
- resName: MissionPre
extension: .prefab
resPathIndex: 503
@ -53591,6 +53616,14 @@ MonoBehaviour:
extension: .prefab
resPathIndex: 518
resAbNameIndex: 3213
- resName: HandBookRoleInfoLayout
extension: .prefab
resPathIndex: 518
resAbNameIndex: 3213
- resName: RoleAwakelayout
extension: .prefab
resPathIndex: 518
resAbNameIndex: 3213
- resName: RoleAwakeSuccessPanel
extension: .prefab
resPathIndex: 518
@ -53611,6 +53644,10 @@ MonoBehaviour:
extension: .prefab
resPathIndex: 518
resAbNameIndex: 3213
- resName: RoleInfoLayout
extension: .prefab
resPathIndex: 518
resAbNameIndex: 3213
- resName: RoleInfoPanel
extension: .prefab
resPathIndex: 518
@ -53635,6 +53672,14 @@ MonoBehaviour:
extension: .prefab
resPathIndex: 518
resAbNameIndex: 3213
- resName: RoleSkinLayout
extension: .prefab
resPathIndex: 518
resAbNameIndex: 3213
- resName: RoleStoryLayout
extension: .prefab
resPathIndex: 518
resAbNameIndex: 3213
- resName: RoleTalentPopup
extension: .prefab
resPathIndex: 518
@ -53651,6 +53696,10 @@ MonoBehaviour:
extension: .prefab
resPathIndex: 518
resAbNameIndex: 3213
- resName: RoleUpStarLayout
extension: .prefab
resPathIndex: 518
resAbNameIndex: 3213
- resName: RoleUpStarListPanel
extension: .prefab
resPathIndex: 518
@ -74377,8 +74426,6 @@ MonoBehaviour:
- lz4/bg/r_hero_bg_ren.unity3d
- lz4/bg/r_hero_bg_yao.unity3d
- lz4/bg/r_tujian_di.unity3d
- lz4/bg/ui/roleinfo/r_hero_zhuanji002.unity3d
- lz4/dynamicatlas/r_dungeon_xuanzeweijiesuodi.unity3d
- lz4/dynamicatlas/r_hero_di.unity3d
- lz4/dynamicatlas/r_tujian_banner_01.unity3d
- lz4/dynamicatlas/r_tujian_banner_02.unity3d
@ -74386,7 +74433,6 @@ MonoBehaviour:
- lz4/fonts/kaiu.unity3d
- lz4/fonts/powerfont.unity3d
- lz4/fonts/powernewfont.unity3d
- lz4/icons.unity3d
- lz4/prefabs/ui/view.unity3d
- lz4/publicartres/animations.unity3d
- lz4/publicartres/materials.unity3d
@ -74665,6 +74711,7 @@ MonoBehaviour:
dependences:
- lz4/atlas/activityaltas.unity3d
- lz4/atlas/carbonatlas.unity3d
- lz4/atlas/commonatlas.unity3d
- lz4/atlas/mainatlas.unity3d
- lz4/atlas/publicatlas.unity3d
- lz4/atlas/tagatlas.unity3d

View File

@ -418,5 +418,5 @@ SubUIConfig = {
[7] = {name = "MissionPre",assetName = "MissionPre",script = "Modules/Operating/MissionPre"},
[8] = {name = "UppperMonthCard",assetName = "UppperMonthCard",script = "Modules/Operating/UppperMonthCard"},
[9] = {name = "ItemUpstarPre",assetName = "ItemUpstarPre",script = "Modules/NewActivity/ItemUpstarPre"},
[10] = {name = "CommonPage",assetName = "CommonPage",script = "Modules/NewActivity/CommonActPage"}
[10] = {name = "CommonActPage",assetName = "CommonActPage",script = "Modules/NewActivity/CommonActPage"}
}

View File

@ -194,6 +194,7 @@ function ActivityMainPanel:OnClose()
redPointTypeList = {}
--关闭弹窗界面
for k,v in pairs(subViewList) do
LogPink("v.sub:"..tostring(v.sub))
v.sub:OnDestroy()
SubUIManager.Close(v.sub)
end

View File

@ -728,8 +728,6 @@ function this:TabBtnAction(id,actType,data)
UIManager.OpenPanel(UIName.FuXingGaoZhaoPanel)
elseif id == ActivityTypeDef.ZhiZunHaoLi6 then
UIManager.OpenPanel(UIName.ZhiZunHaoLiPanel)
elseif id == ActivityTypeDef.YunYouShangRen then
UIManager.OpenPanel(UIName.ActivityMainPanel,id)
end
elseif actType == 2 then
if id == FUNCTION_OPEN_TYPE.SERVER_START_GIFT then
@ -737,7 +735,8 @@ function this:TabBtnAction(id,actType,data)
elseif id == 36 then
UIManager.OpenPanel(UIName.ActivityMainPanel,id)
elseif id == FUNCTION_OPEN_TYPE.EXPERT then
UIManager.OpenPanel(UIName.ExpertPanel)
-- UIManager.OpenPanel(UIName.ExpertPanel)
UIManager.OpenPanel(UIName.ActivityMainPanel,id)
elseif id == 40 then
UIManager.OpenPanel(UIName.ActivityMainPanel,id)
elseif id == FUNCTION_OPEN_TYPE.LUCKYTURN then

View File

@ -91,8 +91,9 @@ function CommonActPage:RefreshActData(isTop,isAni)
self.scrollView:ForeachItemGO(function(index, go)
go.gameObject:SetActive(false)
end)
self.scrollView:SetData(self.shopData, function (index, item)
self:ShowSingleData(item, self.ActData[index],index)
LogRed("self.ActData:"..tostring(#self.ActData.rewards))
self.scrollView:SetData(self.ActData.rewards, function (index, item)
self:ShowSingleData(item, self.ActData.rewards[index],index)
end,not isTop,not isAni)
end
@ -123,10 +124,10 @@ function CommonActPage:RefreshTime()
end
self.time:SetActive(true)
local freshTime = self.ActData.endTime - GetTimeStamp()
self.timeText.text = TimeToFelaxible(freshTime)
self.timeText.text = Language[10023]..TimeToFelaxible(freshTime)
self.localTimer = Timer.New(function ()
freshTime = freshTime - 1
self.timeText.text = TimeToFelaxible(freshTime)
self.timeText.text = Language[10023]..TimeToFelaxible(freshTime)
if freshTime <= 0 then
self.parent:ClosePanel()
end

View File

@ -10,11 +10,12 @@ function this.GetData(actType)
dataList[actType] = this.InitSingleTypeData(actType)
end
this.UpdateSingleTypeData(actType)
return dataList[actType]
end
function this.InitSingleTypeData(actType)
local singleTypeData = {}
local data = ActivityGiftManager.GetActivityInfoByType(actType)
local data = ActivityGiftManager.GetActivityTypeInfo(actType)
local configData = ConfigManager.GetAllConfigsDataByKey(ConfigName.ComposeActivity,"ActivityId",data.activityId)
LogPink("Init".." activityId:"..tostring(data.activityId).." value:"..tostring(data.value).." startTime:"..tostring(data.startTime).." endTime:"..tostring(data.endTime))
singleTypeData.activityId = data.activityId
@ -22,32 +23,36 @@ function this.InitSingleTypeData(actType)
singleTypeData.startTime = data.startTime
singleTypeData.endTime = data.endTime
singleTypeData.rewards = {}
for i = 1, #data.mission do
for i = 1, #configData do
local reward = {}
LogGreen("i:"..tostring(i).." missionId:"..tostring(data.mission[i].missionId).." progress:"..tostring(data.mission[i].progress).." state:"..tostring(data.mission[i].state).." NeedItems:"..tostring(configData[i].NeedItems).." Count:"..tostring(configData[i].Count).." ComposeType:"..tostring(configData[i].ComposeType))
reward.missionId = data.mission[i].missionId
reward.progress = data.mission[i].progress
reward.state = data.mission[i].state
reward.needItems = configData[i].NeedItems
reward.count = configData[i].Count
reward.composeType = configData[i].ComposeType
table.insert(singleTypeData.rewards,reward)
if data.mission[i] then
reward.missionId = data.mission[i].missionId or 0
reward.progress = data.mission[i].progress or 0
reward.state = data.mission[i].state or 0
reward.needItems = configData[i].NeedItems
reward.count = configData[i].Count
reward.composeType = configData[i].ComposeType
LogGreen("i:"..tostring(i).." missionId:"..tostring(reward.missionId).." progress:"..tostring(reward.progress).." state:"..tostring(reward.state).." NeedItems:"..tostring(configData[i].NeedItems).." Count:"..tostring(configData[i].Count).." ComposeType:"..tostring(configData[i].ComposeType))
table.insert(singleTypeData.rewards,reward)
end
end
return singleTypeData
end
function this.UpdateSingleTypeData(actType)
local data = ActivityGiftManager.GetActivityInfoByType(actType)
local data = ActivityGiftManager.GetActivityTypeInfo(actType)
LogPink("Update".." activityId:"..tostring(data.activityId).." value:"..tostring(data.value).." startTime:"..tostring(data.startTime).." endTime:"..tostring(data.endTime))
dataList[actType].activityId = data.activityId--应该无变化
dataList[actType].value = data.value
dataList[actType].startTime = data.startTime--应该无变化
dataList[actType].endTime = data.endTime--应该无变化
for i = 1, #data.mission do
LogGreen("i:"..tostring(i).." missionId:"..tostring(data.mission[i].missionId).." progress:"..tostring(data.mission[i].progress).." state:"..tostring(data.mission[i].state).." NeedItems:"..tostring(dataList[actType].rewards[i].NeedItems).." Count:"..tostring(dataList[actType].rewards[i].Count).." ComposeType:"..tostring(dataList[actType].rewards[i].ComposeType))
dataList[actType].rewards[i].missionId = data.mission[i].missionId--应该无变化
dataList[actType].rewards[i].progress = data.mission[i].progress
dataList[actType].rewards[i].state = data.mission[i].state
if data.mission[i] then
dataList[actType].rewards[i].missionId = data.mission[i].missionId or 0--应该无变化
dataList[actType].rewards[i].progress = data.mission[i].progress or 0
dataList[actType].rewards[i].state = data.mission[i].state or 0
LogGreen("i:"..tostring(i).." missionId:"..tostring(dataList[actType].rewards[i].missionId).." progress:"..tostring(dataList[actType].rewards[i].progress).." state:"..tostring(dataList[actType].rewards[i].state).." NeedItems:"..tostring(dataList[actType].rewards[i].NeedItems).." Count:"..tostring(dataList[actType].rewards[i].Count).." ComposeType:"..tostring(dataList[actType].rewards[i].ComposeType))
end
end
end

View File

@ -20,6 +20,7 @@ function ItemUpstarPre:InitComponent()
self.itemNeed = Util.GetGameObject(self.midLayout,"itemNeed/item")
self.itemCost = Util.GetGameObject(self.midLayout,"itemCost/item")
self.itemGet = Util.GetGameObject(self.midLayout,"itemGet/item")
self.itemList = {}
end
--绑定事件(用于子类重写)
@ -34,12 +35,32 @@ end
function ItemUpstarPre:RemoveListener()
end
function ItemUpstarPre:OnOpen(data,_parent,sortingOrder)
function ItemUpstarPre:OnOpen()
end
function ItemUpstarPre:SetData(data,_parent,sortingOrder)
self.data = data
self.parent = _parent
--设置礼包内容
if not self.itemList then
self.itemList = {}
end
for i = 1, #self.itemList do
self.itemList[i].gameObject:SetActive(false)
end
for i = 1, 3 do
if not self.itemList[i] then
self.itemList[i] = SubUIManager.Open(SubUIConfig.ItemView,self.grid.transform)
self.itemList[i].gameObject:SetActive(false)
end
self.itemList[i]:OnOpen(false, {self.data.data.shows[i][1],self.data.data.shows[i][2],self.data.data.shows[i][3]}, 0.9,false,false,false,sortingOrder)
self.itemList[i].gameObject:SetActive(true)
end
end
function ItemUpstarPre:OnClose()
self.itemList = {}
end
return ItemUpstarPre