parent
33edb62796
commit
ab7c586a90
|
@ -144984,7 +144984,7 @@ GameObject:
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 1
|
m_IsActive: 0
|
||||||
--- !u!224 &268016902880247916
|
--- !u!224 &268016902880247916
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -145000,10 +145000,10 @@ RectTransform:
|
||||||
m_Father: {fileID: 224358324289722092}
|
m_Father: {fileID: 224358324289722092}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 1}
|
||||||
m_AnchorMax: {x: 0, y: 0}
|
m_AnchorMax: {x: 0, y: 1}
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 97.10004, y: -82}
|
||||||
m_SizeDelta: {x: 0, y: 0}
|
m_SizeDelta: {x: 155, y: 85}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!222 &1834664782885917125
|
--- !u!222 &1834664782885917125
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
|
|
|
@ -32,7 +32,7 @@ local curHeroData
|
||||||
local heroListData
|
local heroListData
|
||||||
local curSelectEquipData
|
local curSelectEquipData
|
||||||
local index
|
local index
|
||||||
local indexBtnNum = 0
|
local indexBtnNum = 1
|
||||||
local typeTab = {
|
local typeTab = {
|
||||||
[0] = Language[10175],
|
[0] = Language[10175],
|
||||||
[1] = Language[10391],
|
[1] = Language[10391],
|
||||||
|
@ -86,7 +86,7 @@ function RoleEquipPanel:InitComponent()
|
||||||
end
|
end
|
||||||
--装备list
|
--装备list
|
||||||
this.effect = Util.GetGameObject(self.transform, "bg/effect")
|
this.effect = Util.GetGameObject(self.transform, "bg/effect")
|
||||||
for i = 0, 6 do
|
for i = 1, 6 do
|
||||||
tabs[i] = Util.GetGameObject(self.transform, "Tabs/Btn" .. i)
|
tabs[i] = Util.GetGameObject(self.transform, "Tabs/Btn" .. i)
|
||||||
Util.GetGameObject(tabs[i], "Text"):GetComponent("Text").fontSize = GetCurLanguage() == 0 and 48 or 40
|
Util.GetGameObject(tabs[i], "Text"):GetComponent("Text").fontSize = GetCurLanguage() == 0 and 48 or 40
|
||||||
effectList[i] = Util.GetGameObject(self.transform, "bg/equipInfo/equip" .. i .. "/effect")
|
effectList[i] = Util.GetGameObject(self.transform, "bg/equipInfo/equip" .. i .. "/effect")
|
||||||
|
@ -192,7 +192,7 @@ function RoleEquipPanel:BindEvent()
|
||||||
|
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
for i = 0, 6 do
|
for i = 1, 6 do
|
||||||
Util.AddClick(
|
Util.AddClick(
|
||||||
tabs[i],
|
tabs[i],
|
||||||
function()
|
function()
|
||||||
|
@ -201,11 +201,12 @@ function RoleEquipPanel:BindEvent()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
indexBtnNum = i
|
indexBtnNum = i
|
||||||
if indexBtnNum == PosIdConst.All then
|
this:OnClickTabBtn(indexBtnNum)
|
||||||
this:OnClickAllBtn()
|
-- if indexBtnNum == PosIdConst.All then
|
||||||
else
|
-- this:OnClickAllBtn()
|
||||||
this:OnClickTabBtn(indexBtnNum)
|
-- else
|
||||||
end
|
-- this:OnClickTabBtn(indexBtnNum)
|
||||||
|
-- end
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
@ -247,11 +248,12 @@ end
|
||||||
|
|
||||||
function this.CurrEquipDataChange()
|
function this.CurrEquipDataChange()
|
||||||
this.ShowHeroEquip()
|
this.ShowHeroEquip()
|
||||||
if indexBtnNum == PosIdConst.All then
|
this:OnClickTabBtn(indexBtnNum)
|
||||||
this:OnClickAllBtn()
|
-- if indexBtnNum == PosIdConst.All then
|
||||||
else
|
-- this:OnClickAllBtn()
|
||||||
this:OnClickTabBtn(indexBtnNum)
|
-- else
|
||||||
end
|
-- this:OnClickTabBtn(indexBtnNum)
|
||||||
|
-- end
|
||||||
end
|
end
|
||||||
|
|
||||||
--界面打开时调用(用于子类重写)
|
--界面打开时调用(用于子类重写)
|
||||||
|
@ -284,10 +286,10 @@ function RoleEquipPanel:OnShow()
|
||||||
effectList[i]:SetActive(false)
|
effectList[i]:SetActive(false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
indexBtnNum = PosIdConst.All
|
indexBtnNum = PosIdConst.WuQi
|
||||||
teamHero = FormationManager.GetAllMainFormationHeroId()
|
teamHero = FormationManager.GetAllMainFormationHeroId()
|
||||||
this.ShowHeroEquip(true)
|
this.ShowHeroEquip(true)
|
||||||
this:OnClickAllBtn()
|
this:OnClickTabBtn(indexBtnNum)
|
||||||
this.UpView:OnOpen({showType = UpViewOpenType.ShowLeft, panelType = PanelType.Main})
|
this.UpView:OnOpen({showType = UpViewOpenType.ShowLeft, panelType = PanelType.Main})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -301,22 +303,24 @@ function this:RightBtnOnClick()
|
||||||
index = (index + 1 <= #heroListData and index + 1 or 1)
|
index = (index + 1 <= #heroListData and index + 1 or 1)
|
||||||
curHeroData = heroListData[index]
|
curHeroData = heroListData[index]
|
||||||
this.ShowHeroEquip()
|
this.ShowHeroEquip()
|
||||||
if indexBtnNum == PosIdConst.All then
|
this:OnClickTabBtn(indexBtnNum)
|
||||||
this:OnClickAllBtn()
|
-- if indexBtnNum == PosIdConst.All then
|
||||||
else
|
-- this:OnClickAllBtn()
|
||||||
this:OnClickTabBtn(indexBtnNum)
|
-- else
|
||||||
end
|
-- this:OnClickTabBtn(indexBtnNum)
|
||||||
|
-- end
|
||||||
end
|
end
|
||||||
--左切换按钮点击
|
--左切换按钮点击
|
||||||
function this:LeftBtnOnClick()
|
function this:LeftBtnOnClick()
|
||||||
index = (index - 1 > 0 and index - 1 or #heroListData)
|
index = (index - 1 > 0 and index - 1 or #heroListData)
|
||||||
curHeroData = heroListData[index]
|
curHeroData = heroListData[index]
|
||||||
this.ShowHeroEquip()
|
this.ShowHeroEquip()
|
||||||
if indexBtnNum == PosIdConst.All then
|
this:OnClickTabBtn(indexBtnNum)
|
||||||
this:OnClickAllBtn()
|
-- if indexBtnNum == PosIdConst.All then
|
||||||
else
|
-- this:OnClickAllBtn()
|
||||||
this:OnClickTabBtn(indexBtnNum)
|
-- else
|
||||||
end
|
-- this:OnClickTabBtn(indexBtnNum)
|
||||||
|
-- end
|
||||||
end
|
end
|
||||||
|
|
||||||
--一键装备
|
--一键装备
|
||||||
|
@ -716,25 +720,25 @@ function this:UpdateEquipItem(go,data,lvObj,refineObj)
|
||||||
end
|
end
|
||||||
EquipManager.SetEquipStarShow(this.spLoader, Util.GetGameObject(go.transform, "frame/star"),data.itemConfig.Id)
|
EquipManager.SetEquipStarShow(this.spLoader, Util.GetGameObject(go.transform, "frame/star"),data.itemConfig.Id)
|
||||||
end
|
end
|
||||||
--点击全部按钮
|
-- --点击全部按钮
|
||||||
function this:OnClickAllBtn()
|
-- function this:OnClickAllBtn()
|
||||||
this:SetSelectBtn()
|
-- this:SetSelectBtn()
|
||||||
local itemData = BagManager.GetEquipDataByEquipPosition(curHeroData.heroConfig.Profession)
|
-- local itemData = BagManager.GetEquipDataByEquipPosition(curHeroData.heroConfig.Profession)
|
||||||
this:SortEquipDatas(itemData)
|
-- this:SortEquipDatas(itemData)
|
||||||
local count = 0
|
-- local count = 0
|
||||||
for i=1,#itemData do
|
-- for i=1,#itemData do
|
||||||
count = count + 1--itemData[i].num
|
-- count = count + 1--itemData[i].num
|
||||||
end
|
-- end
|
||||||
--加上宝器数据
|
-- --加上宝器数据
|
||||||
local curAllEquipTreasure = EquipTreasureManager.GetAllTreasures(curHeroData.heroConfig.PropertyName)
|
-- local curAllEquipTreasure = EquipTreasureManager.GetAllTreasures(curHeroData.heroConfig.PropertyName)
|
||||||
--宝器排序
|
-- --宝器排序
|
||||||
for i = 1, #curAllEquipTreasure do
|
-- for i = 1, #curAllEquipTreasure do
|
||||||
table.insert(itemData, curAllEquipTreasure[i])
|
-- table.insert(itemData, curAllEquipTreasure[i])
|
||||||
end
|
-- end
|
||||||
--"装备数量:"
|
-- --"装备数量:"
|
||||||
this.itemNumText.text = Language[12181] .. count + LengthOfTable(curAllEquipTreasure)
|
-- this.itemNumText.text = Language[12181] .. count + LengthOfTable(curAllEquipTreasure)
|
||||||
this:SetItemData(itemData)
|
-- this:SetItemData(itemData)
|
||||||
end
|
-- end
|
||||||
|
|
||||||
--点击装备按钮
|
--点击装备按钮
|
||||||
function this:OnClickTabBtn(_index)
|
function this:OnClickTabBtn(_index)
|
||||||
|
@ -1076,12 +1080,13 @@ function this.UpdateEquipPosHeroData(_equipOrTreasure, _type, _selectEquipDataLi
|
||||||
this.ShowHeroEquip()
|
this.ShowHeroEquip()
|
||||||
--上阵刷新红点
|
--上阵刷新红点
|
||||||
this.allEquipUpRedPoint:SetActive(#HeroManager.GetHeroIsUpEquip(curHeroData.dynamicId) > 0 and isUpZhen)
|
this.allEquipUpRedPoint:SetActive(#HeroManager.GetHeroIsUpEquip(curHeroData.dynamicId) > 0 and isUpZhen)
|
||||||
--刷新当前英雄可穿装备
|
this:OnClickTabBtn(indexBtnNum)
|
||||||
if indexBtnNum == PosIdConst.All then
|
-- --刷新当前英雄可穿装备
|
||||||
this:OnClickAllBtn()
|
-- if indexBtnNum == PosIdConst.All then
|
||||||
else
|
-- this:OnClickAllBtn()
|
||||||
this:OnClickTabBtn(indexBtnNum)
|
-- else
|
||||||
end
|
-- this:OnClickTabBtn(indexBtnNum)
|
||||||
|
-- end
|
||||||
--对比战力并更新战力值 播放战力变更动画
|
--对比战力并更新战力值 播放战力变更动画
|
||||||
HeroManager.CompareWarPower(curHeroData.dynamicId)
|
HeroManager.CompareWarPower(curHeroData.dynamicId)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue