【化虚坛优化】化虚坛中有可合成的将时,在神将头像、页签按钮,和化虚坛入口上添加红点提示

dev_chengFeng
zhangqiang 2021-05-19 10:27:55 +08:00
parent 15c655cbf5
commit 491b7b54a7
11 changed files with 171 additions and 52 deletions

View File

@ -5828,6 +5828,7 @@ RectTransform:
- {fileID: 2701908191822566829}
- {fileID: 5421851735876212900}
- {fileID: 5034818767700377608}
- {fileID: 6682423048505512204}
m_Father: {fileID: 2071946167415076167}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -8421,6 +8422,80 @@ MonoBehaviour:
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: 5/5
--- !u!1 &5818421898230191816
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6682423048505512204}
- component: {fileID: 2622281877275856427}
- component: {fileID: 7647110427972327317}
m_Layer: 5
m_Name: redPoint
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6682423048505512204
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5818421898230191816}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 6255514023795596344}
m_RootOrder: 12
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 58, y: 78}
m_SizeDelta: {x: 30, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2622281877275856427
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5818421898230191816}
m_CullTransparentMesh: 0
--- !u!114 &7647110427972327317
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5818421898230191816}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 0
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: f9ea4c4aff328ff4abcc21aae0a4fa10, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
--- !u!1 &5828381760693471867
GameObject:
m_ObjectHideFlags: 0
@ -11113,7 +11188,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 57.8, y: 43.4}
m_AnchoredPosition: {x: 94.8, y: 34}
m_SizeDelta: {x: 26, y: 26}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &9111660389744668029
@ -14424,26 +14499,21 @@ PrefabInstance:
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2320031818352649172, guid: e356d5948e4971f499cfe38db3551f59,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 3.2600002
objectReference: {fileID: 0}
- target: {fileID: 2320031818794305969, guid: e356d5948e4971f499cfe38db3551f59,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 3.2600002
objectReference: {fileID: 0}
- target: {fileID: 2320031819195525549, guid: e356d5948e4971f499cfe38db3551f59,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 3.2600002
objectReference: {fileID: 0}
- target: {fileID: 2320031820207909310, guid: e356d5948e4971f499cfe38db3551f59,
- target: {fileID: 2320031818352649172, guid: e356d5948e4971f499cfe38db3551f59,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 3.2600002
objectReference: {fileID: 0}
- target: {fileID: 2320031819931042899, guid: e356d5948e4971f499cfe38db3551f59,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -16.999998
objectReference: {fileID: 0}
- target: {fileID: 2320031819916146513, guid: e356d5948e4971f499cfe38db3551f59,
type: 3}
propertyPath: m_AnchoredPosition.y
@ -14454,10 +14524,15 @@ PrefabInstance:
propertyPath: m_AnchoredPosition.y
value: -16.999998
objectReference: {fileID: 0}
- target: {fileID: 2320031819931042899, guid: e356d5948e4971f499cfe38db3551f59,
- target: {fileID: 2320031818794305969, guid: e356d5948e4971f499cfe38db3551f59,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -16.999998
value: 3.2600002
objectReference: {fileID: 0}
- target: {fileID: 2320031820207909310, guid: e356d5948e4971f499cfe38db3551f59,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 3.2600002
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: e356d5948e4971f499cfe38db3551f59, type: 3}
@ -14589,26 +14664,21 @@ PrefabInstance:
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 2320031818352649172, guid: e356d5948e4971f499cfe38db3551f59,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 3.2600002
objectReference: {fileID: 0}
- target: {fileID: 2320031818794305969, guid: e356d5948e4971f499cfe38db3551f59,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 3.2600002
objectReference: {fileID: 0}
- target: {fileID: 2320031819195525549, guid: e356d5948e4971f499cfe38db3551f59,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 3.2600002
objectReference: {fileID: 0}
- target: {fileID: 2320031820207909310, guid: e356d5948e4971f499cfe38db3551f59,
- target: {fileID: 2320031818352649172, guid: e356d5948e4971f499cfe38db3551f59,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 3.2600002
objectReference: {fileID: 0}
- target: {fileID: 2320031819931042899, guid: e356d5948e4971f499cfe38db3551f59,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -16.999998
objectReference: {fileID: 0}
- target: {fileID: 2320031819916146513, guid: e356d5948e4971f499cfe38db3551f59,
type: 3}
propertyPath: m_AnchoredPosition.y
@ -14619,10 +14689,15 @@ PrefabInstance:
propertyPath: m_AnchoredPosition.y
value: -16.999998
objectReference: {fileID: 0}
- target: {fileID: 2320031819931042899, guid: e356d5948e4971f499cfe38db3551f59,
- target: {fileID: 2320031818794305969, guid: e356d5948e4971f499cfe38db3551f59,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -16.999998
value: 3.2600002
objectReference: {fileID: 0}
- target: {fileID: 2320031820207909310, guid: e356d5948e4971f499cfe38db3551f59,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 3.2600002
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: e356d5948e4971f499cfe38db3551f59, type: 3}
@ -14754,26 +14829,21 @@ PrefabInstance:
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2320031818352649172, guid: e356d5948e4971f499cfe38db3551f59,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 3.2600002
objectReference: {fileID: 0}
- target: {fileID: 2320031818794305969, guid: e356d5948e4971f499cfe38db3551f59,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 3.2600002
objectReference: {fileID: 0}
- target: {fileID: 2320031819195525549, guid: e356d5948e4971f499cfe38db3551f59,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 3.2600002
objectReference: {fileID: 0}
- target: {fileID: 2320031820207909310, guid: e356d5948e4971f499cfe38db3551f59,
- target: {fileID: 2320031818352649172, guid: e356d5948e4971f499cfe38db3551f59,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 3.2600002
objectReference: {fileID: 0}
- target: {fileID: 2320031819931042899, guid: e356d5948e4971f499cfe38db3551f59,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -16.999998
objectReference: {fileID: 0}
- target: {fileID: 2320031819916146513, guid: e356d5948e4971f499cfe38db3551f59,
type: 3}
propertyPath: m_AnchoredPosition.y
@ -14784,10 +14854,15 @@ PrefabInstance:
propertyPath: m_AnchoredPosition.y
value: -16.999998
objectReference: {fileID: 0}
- target: {fileID: 2320031819931042899, guid: e356d5948e4971f499cfe38db3551f59,
- target: {fileID: 2320031818794305969, guid: e356d5948e4971f499cfe38db3551f59,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -16.999998
value: 3.2600002
objectReference: {fileID: 0}
- target: {fileID: 2320031820207909310, guid: e356d5948e4971f499cfe38db3551f59,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 3.2600002
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: e356d5948e4971f499cfe38db3551f59, type: 3}

View File

@ -896,7 +896,9 @@ RedPointType = {
HongMeng_OpenBox = 8013, -- 格子开启
--山河社稷图
FightLevel = 802,--山河社稷图入口
--化虚坛
Huaxutan = 803,--化虚坛主界面红点
Huaxutan_CompoundHero = 8031,--化虚坛英雄合成红点
--修行
Practice = 500,--主界面下方按钮

View File

@ -616,6 +616,7 @@ function this.GoIntoBackData(drop)
--SoulPrintManager.InitServerData(drop.soulEquip)
PokemonManager.InitPokemonsData(drop.pokemon)
end
CheckRedPointStatus(RedPointType.Huaxutan_CompoundHero)
end
function this.GMCallBackData(drop)
@ -702,6 +703,7 @@ function this.GetTableByBackDropData(drop)
HeroManager.UpdateHeroDatas(itemdata.backData)
end
end
CheckRedPointStatus(RedPointType.Huaxutan_CompoundHero)
-- if drop.especialEquipId ~= nil and #drop.especialEquipId > 0 then
-- Log("drop.especialEquipId " .. #drop.especialEquipId)
-- for i = 1, #drop.especialEquipId do

View File

@ -1,8 +1,9 @@
require("Base/BasePanel")
CompoundHeroPanel = Inherit(BasePanel)
local this = CompoundHeroPanel
local TabBoxRedPoints = {}
local TabBox = require("Modules/Common/TabBox")
local _TabData={ [1] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = Language[10404] },
local _TabData={ [1] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = Language[10404],redPointType = RedPointType.Huaxutan_CompoundHero },
[2] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = Language[10405] },
}
@ -26,10 +27,11 @@ function CompoundHeroPanel:InitComponent()
this.btnBack = Util.GetGameObject(self.gameObject, "btnBack/btnBack")
--预设赋值
this.prefabs = {}
this.prefabRedPoints = {}
for i=1,#this.contents do
this.prefabs[i]=Util.GetGameObject(this.panle,this.contents[i].panelName)
this.contents[i].view:InitComponent(this.panle)
this.prefabRedPoints = Util.GetGameObject(this.prefabs[i], "btnBack/btnBack")
end
end
@ -41,6 +43,18 @@ function CompoundHeroPanel:BindEvent()
for i = 1, #this.contents do
this.contents[i].view:BindEvent()
end
TabBoxRedPoints = {}
this.TabCtrl = TabBox.New()
this.TabCtrl:SetTabAdapter(this.TabAdapter)
this.TabCtrl:SetChangeTabCallBack(this.SwitchView)
this.TabCtrl:Init(this.tabBox, _TabData)
for i = 1, #_TabData do
TabBoxRedPoints[i] = Util.GetGameObject(this.tabBox, "box/tab"..i.."/Redpot")
if _TabData[i] and _TabData[i].redPointType and TabBoxRedPoints[i] then
LogYellow("_TabData[i].redPointType ".._TabData[i].redPointType)
BindRedPointObject(_TabData[i].redPointType,TabBoxRedPoints[i])
end
end
end
function CompoundHeroPanel.RefreshHelpBtn()
@ -79,10 +93,9 @@ function CompoundHeroPanel:OnOpen(_curIndex)
end
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
function CompoundHeroPanel:OnShow()
this.TabCtrl = TabBox.New()
this.TabCtrl:SetTabAdapter(this.TabAdapter)
this.TabCtrl:SetChangeTabCallBack(this.SwitchView)
this.TabCtrl:Init(this.tabBox, _TabData, curIndex)
if this.TabCtrl then
this.TabCtrl:ChangeTab(curIndex)
end
end
function CompoundHeroPanel:OnSortingOrderChange()
@ -139,6 +152,11 @@ function CompoundHeroPanel:OnDestroy()
for i = 1, #this.contents do
this.contents[i].view:OnDestroy()
end
for i = 1, #_TabData do
if _TabData[i] and _TabData[i].redPointType and TabBoxRedPoints[i] then
ClearRedPointObject(_TabData[i].redPointType,TabBoxRedPoints[i])
end
end
end
return CompoundHeroPanel

View File

@ -68,6 +68,7 @@ function this:OnSortingOrderChange(_sortingOrder)
sortingOrder = _sortingOrder
end
function this:OnShow(...)
HeroManager.GetAllHeroCompoundRedPoint()
curIndex = 0
sortingOrder =0
for i = 0,#tabs - 1 do
@ -440,6 +441,7 @@ function this.SingleHeroDataShow(_go,_heroData)
progress2:SetActive(LengthOfTable(heroData.haveHeroList2) >= heroData.needNum)
progress1:GetComponent("Image").fillAmount = num
progress2:GetComponent("Image").fillAmount = num
Util.GetGameObject(go.transform, "redPoint"):SetActive(LengthOfTable(heroData.haveHeroList2) >= heroData.needNum)
progressText.text = LengthOfTable(heroData.haveHeroList2).."/"..heroData.needNum
local cardBtn = Util.GetGameObject(go.transform, "icon")
local choosed = Util.GetGameObject(go.transform, "choosed")

View File

@ -101,6 +101,7 @@ function this:BindEvent()
HeroManager.UpdateHeroDatas(msg.drop.Hero[i])
ExpeditionManager.InitHeroHpValue(msg.drop.Hero[i].id)
end
CheckRedPointStatus(RedPointType.Huaxutan_CompoundHero)
curSelectHero = HeroManager.GetSingleHeroData(msg.drop.Hero[1].id)
this.ShowCurrPosHeroReplace(curIndex)
end)

View File

@ -507,6 +507,7 @@ function this.DeleteHeroDatas(heroDIds)
heroDatas[heroDIds[i]] = nil
end
end
CheckRedPointStatus(RedPointType.Huaxutan_CompoundHero)
end
--更新本地单个英雄基本信息
function this.UpdateSingleHeroDatas(heroDId, heroLv, heroStar, breakId, upStarId, isCallBackChangeWar)
@ -2830,6 +2831,17 @@ function this.GetFormationHeroRedPoint()
end
return false
end
--化虚坛红点判断
function this.GetAllHeroCompoundRedPoint()
for i, v in pairs(heroDatas) do
if v.star == 4 or v.star == 5 then
if this.IsShowUpStarRedPoint(v,true) then
return true
end
end
end
return false
end
--单个英雄所有红点判断
function this.GetCurHeroIsShowRedPoint(curHeroData)
return this.GetCurHeroUpLvOrUpStarSData(curHeroData) or this.LvUpBtnRedPoint(curHeroData) or
@ -2915,7 +2927,7 @@ function this.LvUpBtnRedPoint(curHeroData)
return false
end
--单个英雄升星红点
function this.IsShowUpStarRedPoint(curHeroData)
function this.IsShowUpStarRedPoint(curHeroData,isNoDeleFormation)--isNoDeleFormation 可选传参数 材料筛选是否去除上阵英雄
HeroManager.GetCurHeroUpLvOrUpStarSData(curHeroData)
-- if curHeroData.lv >= HeroManager.heroLvEnd[curHeroData.heroConfig.Id] then
-- return false
@ -2960,9 +2972,8 @@ function this.IsShowUpStarRedPoint(curHeroData)
upStarMaterialIsAll[curSelectUpStarData.upStarData[2]] = 2
if #upStarHeroListData.heroList >= curSelectUpStarData.upStarData[4] then
for j = 1, #upStarHeroListData.heroList do
if
upStarHeroListData.heroList[j].lockState == 0 and
upStarHeroListData.heroList[j].isFormation == "" and
if upStarHeroListData.heroList[j].lockState == 0 and
(upStarHeroListData.heroList[j].isFormation == "" or isNoDeleFormation) and
#curSelectHeroList < curSelectUpStarData.upStarData[4] and
not upStarConsumeMaterial[upStarHeroListData.heroList[j].dynamicId] and
not HarmonyManager.IsChangeColor(upStarHeroListData.heroList[j].dynamicId) and

View File

@ -592,6 +592,7 @@ function this.BindRedPoint()
BindRedPointObject(RedPointType.HongMeng,this.HongMengRedPoint)
BindRedPointObject(RedPointType.TianShuMiJuan,this.rpbtnTianShuMiJuan)
BindRedPointObject(RedPointType.FifteenDayGift,this.rpFifteenDayGift)
BindRedPointObject(RedPointType.Huaxutan,this.rpCompoundHero)
end
-- 绑定红点
function this.ClearRedPoint()
@ -610,6 +611,7 @@ function this.ClearRedPoint()
ClearRedPointObject(RedPointType.PokemonMainCity, this.rpPokemon)
ClearRedPointObject(RedPointType.TianShuMiJuan,this.rpbtnTianShuMiJuan)
ClearRedPointObject(RedPointType.FifteenDayGift,this.rpFifteenDayGift)
ClearRedPointObject(RedPointType.Huaxutan,this.rpCompoundHero)
end
--添加事件监听(用于子类重写)

View File

@ -628,6 +628,7 @@ function this.RecruitRequest(type, func)
local singHeroData = msg.drop.Hero[i]
HeroManager.UpdateHeroDatas(singHeroData)
end
CheckRedPointStatus(RedPointType.Huaxutan_CompoundHero)
if func then
func(msg)
end

View File

@ -294,7 +294,8 @@ function this.InitRedPointAllRelate()
RPData:SetParent(RedPointType.LimitExchange_GoExchange,RedPointType.Expert_LimitExchange)
--十五日登录
RPData:SetParent(RedPointType.FifteenDayGift_1,RedPointType.FifteenDayGift)
--化虚坛
RPData:SetParent(RedPointType.Huaxutan_CompoundHero,RedPointType.Huaxutan)
for k,v in ConfigPairs(ConfigManager.GetConfig(ConfigName.ActivityGroups)) do
if v.RpType > 0 and v.RpTypeParent > 0 then
RPData:SetParent(v.RpType,v.RpTypeParent)
@ -513,6 +514,9 @@ function this.RegisterRedCheckFunc()
RPData:AddCheckFunc(RedPointType.LimitExchange_GoExchange,ActivityGiftManager.IsExchangeRedShow)
--十五日登陆
RPData:AddCheckFunc(RedPointType.FifteenDayGift_1,FifteenDayGiftManager.CheckRedPoint)
--化虚坛英雄合成
RPData:AddCheckFunc(RedPointType.Huaxutan_CompoundHero,HeroManager.GetAllHeroCompoundRedPoint)
end

View File

@ -192,6 +192,7 @@ function RewardItemPopup:OnOpen(...)
end
end
end
CheckRedPointStatus(RedPointType.Huaxutan_CompoundHero)
itemDataList = {}
for i, v in pairs(equips) do
table.insert(itemDataList, v)