【宝物】==========宝物添加加号提示
parent
8ad04c122c
commit
e4596beb99
File diff suppressed because it is too large
Load Diff
|
@ -45,6 +45,8 @@ local jewerConfigs = ConfigManager.GetConfig(ConfigName.JewelConfig)
|
|||
local currPageIndex = 0
|
||||
local curEquipTreasureDatas = {}
|
||||
local isCanUpEquipTreasure = false
|
||||
local isPlayAnim = true
|
||||
local isFristOpenTime
|
||||
--初始化组件(用于子类重写)RoleEquipChangePopup
|
||||
function RoleEquipPanel:InitComponent()
|
||||
orginLayer = 10
|
||||
|
@ -121,6 +123,11 @@ function RoleEquipPanel:InitComponent()
|
|||
this.treasurePage2 = Util.GetGameObject(self.transform, "Tabs/Btn6")
|
||||
this.emptyObj = Util.GetGameObject(self.transform, "emptyObj")
|
||||
this.emptyObj.gameObject:SetActive(false)
|
||||
this.mask = Util.GetGameObject(self.gameObject, "mask")
|
||||
this.equipBtn5 = Util.GetGameObject(self.gameObject,"bg/equipInfo/equip5/mask")
|
||||
this.equipBtn6 = Util.GetGameObject(self.gameObject,"bg/equipInfo/equip6/mask")
|
||||
this.equipBTn5Add = Util.GetGameObject(self.gameObject,"bg/equipInfo/equip5/add")
|
||||
this.equipBtn6Add = Util.GetGameObject(self.gameObject,"bg/equipInfo/equip6/add")
|
||||
end
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
|
@ -138,6 +145,7 @@ function RoleEquipPanel:BindEvent()
|
|||
Util.AddClick(
|
||||
this.leftBtn,
|
||||
function()
|
||||
isPlayAnim = true
|
||||
this:LeftBtnOnClick()
|
||||
end
|
||||
)
|
||||
|
@ -145,6 +153,7 @@ function RoleEquipPanel:BindEvent()
|
|||
Util.AddClick(
|
||||
this.rightBtn,
|
||||
function()
|
||||
isPlayAnim = true
|
||||
this:RightBtnOnClick()
|
||||
end
|
||||
)
|
||||
|
@ -163,8 +172,9 @@ function RoleEquipPanel:BindEvent()
|
|||
)
|
||||
for i = 0, 6 do
|
||||
Util.AddClick(
|
||||
tabs[i],
|
||||
tabs[i],
|
||||
function()
|
||||
isPlayAnim = true
|
||||
if i == indexBtnNum then
|
||||
indexBtnNum = PosIdConst.All
|
||||
this:OnClickAllBtn()
|
||||
|
@ -185,6 +195,20 @@ function RoleEquipPanel:BindEvent()
|
|||
UIManager.OpenPanel(UIName.EquipTreasureResonancePanel, curHeroData)
|
||||
end
|
||||
)
|
||||
|
||||
Util.AddClick(
|
||||
this.equipBtn5,
|
||||
function()
|
||||
UIManager.OpenPanel(UIName.RewardItemSingleShowPopup,9999,nil)
|
||||
end
|
||||
)
|
||||
|
||||
Util.AddClick(
|
||||
this.equipBtn6,
|
||||
function()
|
||||
UIManager.OpenPanel(UIName.RewardItemSingleShowPopup,9998,nil)
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
--添加事件监听(用于子类重写)
|
||||
|
@ -225,6 +249,7 @@ function RoleEquipPanel:OnOpen(...)
|
|||
isUpZhen = data[4]
|
||||
end
|
||||
function RoleEquipPanel:OnShow()
|
||||
isPlayAnim = true
|
||||
for i = 1, #heroListData do
|
||||
if curHeroData == heroListData[i] then
|
||||
index = i
|
||||
|
@ -587,6 +612,11 @@ function this.ShowHeroEquip()
|
|||
else
|
||||
refineObj:SetActive(false)
|
||||
end
|
||||
if i==5 then
|
||||
this.equipBTn5Add:SetActive(false)
|
||||
elseif i==6 then
|
||||
this.equipBtn6Add:SetActive(false)
|
||||
end
|
||||
else
|
||||
Util.GetGameObject(go.transform, "frame"):SetActive(false)
|
||||
Util.GetGameObject(go.transform, "mask"):SetActive(true)
|
||||
|
@ -599,6 +629,11 @@ function this.ShowHeroEquip()
|
|||
if refineObj then
|
||||
refineObj:SetActive(false)
|
||||
end
|
||||
if i==5 then
|
||||
this.equipBTn5Add:SetActive(true)
|
||||
elseif i==6 then
|
||||
this.equipBtn6Add:SetActive(true)
|
||||
end
|
||||
end
|
||||
local iconBtn = Util.GetGameObject(go.transform, "icon")
|
||||
Util.AddOnceClick(
|
||||
|
@ -741,11 +776,28 @@ function this:SetItemData(_itemDatas)
|
|||
this.SingleItemDataShow(go, _itemDatas[index])
|
||||
end
|
||||
)
|
||||
if isPlayAnim then
|
||||
if isFristOpenTime then
|
||||
isFristOpenTime:Stop()
|
||||
isFristOpenTime = nil
|
||||
end
|
||||
isFristOpenTime = Timer.New(function()
|
||||
this.mask:SetActive(false)
|
||||
end, 1):Start()
|
||||
this.mask:SetActive(true)
|
||||
SecTorPlayAnimByScroll(this.ScrollView)
|
||||
isPlayAnim = false
|
||||
end
|
||||
end
|
||||
function this.SingleItemDataShow(_go, _itemData)
|
||||
if not itemConfig[_itemData.id] then
|
||||
return
|
||||
end
|
||||
if isPlayAnim then
|
||||
_go.gameObject:SetActive(false)
|
||||
else
|
||||
_go.gameObject:SetActive(true)
|
||||
end
|
||||
local frame = Util.GetGameObject(_go.transform, "frame"):GetComponent("Image")
|
||||
local icon = Util.GetGameObject(_go.transform, "icon"):GetComponent("Image")
|
||||
local name = Util.GetGameObject(_go.transform, "name"):GetComponent("Text")
|
||||
|
@ -1035,6 +1087,10 @@ function this.SelectImageSetParent(_objPoint)
|
|||
end
|
||||
--界面关闭时调用(用于子类重写)
|
||||
function RoleEquipPanel:OnClose()
|
||||
if isFristOpenTime then
|
||||
isFristOpenTime:Stop()
|
||||
isFristOpenTime = nil
|
||||
end
|
||||
end
|
||||
function this:AddRedPointVale(_equipDatas)
|
||||
for j = 1, #_equipDatas do
|
||||
|
|
Loading…
Reference in New Issue