【牛气冲天】修改提交
parent
e026881024
commit
4ccaca133e
|
@ -71,7 +71,7 @@ function ActivityMainPanel:CheckActOpen(_index)
|
|||
local id = ActivityGiftManager.IsActivityTypeOpen(tabs[_index].ActiveType)
|
||||
if id and id > 0 and ActivityGiftManager.IsQualifiled(tabs[_index].ActiveType) then
|
||||
if GlobalActConfig[id].ShowArt and GlobalActConfig[id].ShowArt > 0 then
|
||||
if tabs[_index].ActiveType == ActivityTypeDef.DynamicAct or tabs[_index].ActiveType == ActivityTypeDef.LimitUpHero or tabs[_index].ActiveType == ActivityTypeDef.DynamicActShop then
|
||||
if tabs[_index].ActiveType == ActivityTypeDef.DynamicAct or tabs[_index].ActiveType == ActivityTypeDef.LimitUpHero or tabs[_index].ActiveType == ActivityTypeDef.DynamicActShop or tabs[_index].ActiveType == ActivityTypeDef.NiuQi then
|
||||
_CurPageIndex = _index
|
||||
elseif GlobalActConfig[id].ShowArt == this.activityType then
|
||||
_CurPageIndex = _index
|
||||
|
@ -221,7 +221,7 @@ function this.PageTabAdapter(tab, index, status)
|
|||
local id = ActivityGiftManager.IsActivityTypeOpen(tabs[index].ActiveType)
|
||||
if id and id > 0 and ActivityGiftManager.IsQualifiled(tabs[index].ActiveType) then
|
||||
if GlobalActConfig[id].ShowArt and GlobalActConfig[id].ShowArt > 0 then
|
||||
if tabs[index].ActiveType == ActivityTypeDef.DynamicAct or tabs[index].ActiveType == ActivityTypeDef.LimitUpHero or tabs[index].ActiveType == ActivityTypeDef.DynamicActShop then
|
||||
if tabs[index].ActiveType == ActivityTypeDef.DynamicAct or tabs[index].ActiveType == ActivityTypeDef.LimitUpHero or tabs[index].ActiveType == ActivityTypeDef.DynamicActShop or tabs[index].ActiveType == ActivityTypeDef.NiuQi then
|
||||
isshow = true
|
||||
elseif GlobalActConfig[id].ShowArt == this.activityType then
|
||||
isshow = true
|
||||
|
|
|
@ -108,7 +108,7 @@ function this.InitMsg(msg)
|
|||
this.serData[id].restTime = restTime
|
||||
this.serData[id].switch = switch
|
||||
|
||||
LogGreen(string.format("--- 功能解锁数据 id = %s, startTime = %s, endTime = %s, switch = %s",id, startTime, endTime, switch))
|
||||
-- LogGreen(string.format("--- 功能解锁数据 id = %s, startTime = %s, endTime = %s, switch = %s",id, startTime, endTime, switch))
|
||||
|
||||
-- 用于标记是否解锁使用
|
||||
local typeId = AllActSetConfig[id].IsIDdSame
|
||||
|
|
|
@ -8,26 +8,17 @@ local itemId = 0
|
|||
function this.Initialize()
|
||||
this.InitAllRewardData()
|
||||
Game.GlobalEvent:AddEvent(GameEvent.Mission.NiuQiChongTianTask,this.UpdateStatus)
|
||||
this.isOldNiuQiActivity = true
|
||||
this.IsNewActivity = false
|
||||
end
|
||||
|
||||
--服务器发来的活动进度条数据
|
||||
function this.GetActData()
|
||||
if this.isOldNiuQiActivity then
|
||||
return ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.NiuQi)
|
||||
else
|
||||
return ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.NiuQi)
|
||||
end
|
||||
return ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.NiuQi)
|
||||
end
|
||||
|
||||
--牛气值
|
||||
function this.GetScore()
|
||||
local ActData = {}
|
||||
if this.isOldNiuQiActivity then
|
||||
ActData = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.NiuQi)
|
||||
else
|
||||
ActData = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.NiuQi)
|
||||
end
|
||||
local ActData = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.NiuQi)
|
||||
if not (ActData and ActData.activityId) then return end
|
||||
if #this.configData == 0 then
|
||||
local config = ConfigManager.GetAllConfigsDataByKey(ConfigName.ActivityRewardConfig,"ActivityId",ActData.activityId)
|
||||
|
@ -94,7 +85,7 @@ end
|
|||
--需要显示的任务数据
|
||||
function this.GetNeedRewardData(sort)
|
||||
local needData = {}
|
||||
if this.isOldNiuQiActivity then--老的牛气冲天
|
||||
if not this.IsNewActivity then--老的牛气冲天
|
||||
for i = 1, 2 do
|
||||
local tempdata = {}
|
||||
for k, v in pairs(this.rewardData) do
|
||||
|
@ -157,12 +148,7 @@ function this.GetNeedRewardData(sort)
|
|||
end
|
||||
|
||||
function this.CheckNiuQiChongTianRedPoint(index)
|
||||
local id = 0
|
||||
if this.isOldNiuQiActivity then
|
||||
id = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.NiuQi)
|
||||
else
|
||||
id = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.NiuQi)
|
||||
end
|
||||
local id = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.NiuQi)
|
||||
if not id or id < 1 then
|
||||
return false
|
||||
end
|
||||
|
@ -203,4 +189,13 @@ function this.NiuQiCheckRedPoint4()
|
|||
return false
|
||||
end
|
||||
|
||||
--检查是否为新的牛气冲天
|
||||
function this.CheckIsNewActivity()
|
||||
local id = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.NiuQi)
|
||||
local data = ConfigManager.GetConfigData(ConfigName.GlobalActivity,id)
|
||||
if data.ShowArt == 2 then
|
||||
this.IsNewActivity = true
|
||||
end
|
||||
end
|
||||
|
||||
return this
|
|
@ -11,9 +11,9 @@ function NiuQiChongTianPanel:New(gameObject)
|
|||
return b
|
||||
end
|
||||
local TabBox = require("Modules/Common/TabBox")
|
||||
local _TabData={ [1] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = Language[12251] ,rpType = RedPointType.NiuQiChongTian_1},
|
||||
[2] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = Language[12252] ,rpType = RedPointType.NiuQiChongTian_2},
|
||||
[3] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = Language[12253] ,rpType = RedPointType.NiuQiChongTian_3},}
|
||||
local _TabData={ [1] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = Language[12251] , nameNew = "极速探索" ,rpType = RedPointType.NiuQiChongTian_1},
|
||||
[2] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = Language[12252] , nameNew = "神将招募" ,rpType = RedPointType.NiuQiChongTian_2},
|
||||
[3] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = Language[12253] , nameNew = "神将升星" ,rpType = RedPointType.NiuQiChongTian_3},}
|
||||
local _TabFontColor = { default = Color.New(130 / 255, 128 / 255, 120 / 255, 1),
|
||||
select = Color.New(243 / 255, 235 / 255, 202 / 255, 1)}
|
||||
|
||||
|
@ -49,6 +49,7 @@ function NiuQiChongTianPanel:InitComponent()
|
|||
self.ScrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView, self.scrollItem.transform,self.itemPre, nil, Vector2.New(width, rootHight), 1, 1, Vector2.New(0,0))
|
||||
self.ScrollView.moveTween.MomentumAmount = 1
|
||||
self.ScrollView.moveTween.Strength = 2
|
||||
self.ScrollView.elastic = false
|
||||
|
||||
self.effect5 = Util.GetGameObject(self.reward, "icon (5)/UI_Effect_jinkuang_Yuan")
|
||||
Util.SetParticleSortLayer(self.effect5, 1)
|
||||
|
@ -77,11 +78,7 @@ end
|
|||
--界面打开时调用(用于子类重写)
|
||||
function NiuQiChongTianPanel:OnOpen(_activityConfig,_index,parent)
|
||||
self.actConfig = _activityConfig
|
||||
if self.actConfig.ActiveType == ActivityTypeDef.NiuQi then
|
||||
NiuQiChongTianManager.isOldNiuQiActivity = true
|
||||
else
|
||||
NiuQiChongTianManager.isOldNiuQiActivity = false
|
||||
end
|
||||
NiuQiChongTianManager.CheckIsNewActivity()
|
||||
self.pageIndex = _index
|
||||
self.parent = parent
|
||||
end
|
||||
|
@ -117,7 +114,7 @@ function NiuQiChongTianPanel:OnShow(_sortingOrder)
|
|||
self.redPointList[_TabData[index].rpType] = redPoint
|
||||
end
|
||||
Util.GetGameObject(tab,"Image"):GetComponent("Image").sprite = self.spLoader:LoadSprite(_TabData[index][status])
|
||||
tabLab:GetComponent("Text").text = _TabData[index].name
|
||||
tabLab:GetComponent("Text").text = NiuQiChongTianManager.IsNewActivity and _TabData[index].nameNew or _TabData[index].name
|
||||
tabLab:GetComponent("Text").color = _TabFontColor[status]
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue