【宝物】==========宝物添加加号提示
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 currPageIndex = 0
|
||||||
local curEquipTreasureDatas = {}
|
local curEquipTreasureDatas = {}
|
||||||
local isCanUpEquipTreasure = false
|
local isCanUpEquipTreasure = false
|
||||||
|
local isPlayAnim = true
|
||||||
|
local isFristOpenTime
|
||||||
--初始化组件(用于子类重写)RoleEquipChangePopup
|
--初始化组件(用于子类重写)RoleEquipChangePopup
|
||||||
function RoleEquipPanel:InitComponent()
|
function RoleEquipPanel:InitComponent()
|
||||||
orginLayer = 10
|
orginLayer = 10
|
||||||
|
@ -121,6 +123,11 @@ function RoleEquipPanel:InitComponent()
|
||||||
this.treasurePage2 = Util.GetGameObject(self.transform, "Tabs/Btn6")
|
this.treasurePage2 = Util.GetGameObject(self.transform, "Tabs/Btn6")
|
||||||
this.emptyObj = Util.GetGameObject(self.transform, "emptyObj")
|
this.emptyObj = Util.GetGameObject(self.transform, "emptyObj")
|
||||||
this.emptyObj.gameObject:SetActive(false)
|
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
|
end
|
||||||
|
|
||||||
--绑定事件(用于子类重写)
|
--绑定事件(用于子类重写)
|
||||||
|
@ -138,6 +145,7 @@ function RoleEquipPanel:BindEvent()
|
||||||
Util.AddClick(
|
Util.AddClick(
|
||||||
this.leftBtn,
|
this.leftBtn,
|
||||||
function()
|
function()
|
||||||
|
isPlayAnim = true
|
||||||
this:LeftBtnOnClick()
|
this:LeftBtnOnClick()
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
@ -145,6 +153,7 @@ function RoleEquipPanel:BindEvent()
|
||||||
Util.AddClick(
|
Util.AddClick(
|
||||||
this.rightBtn,
|
this.rightBtn,
|
||||||
function()
|
function()
|
||||||
|
isPlayAnim = true
|
||||||
this:RightBtnOnClick()
|
this:RightBtnOnClick()
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
@ -165,6 +174,7 @@ function RoleEquipPanel:BindEvent()
|
||||||
Util.AddClick(
|
Util.AddClick(
|
||||||
tabs[i],
|
tabs[i],
|
||||||
function()
|
function()
|
||||||
|
isPlayAnim = true
|
||||||
if i == indexBtnNum then
|
if i == indexBtnNum then
|
||||||
indexBtnNum = PosIdConst.All
|
indexBtnNum = PosIdConst.All
|
||||||
this:OnClickAllBtn()
|
this:OnClickAllBtn()
|
||||||
|
@ -185,6 +195,20 @@ function RoleEquipPanel:BindEvent()
|
||||||
UIManager.OpenPanel(UIName.EquipTreasureResonancePanel, curHeroData)
|
UIManager.OpenPanel(UIName.EquipTreasureResonancePanel, curHeroData)
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
--添加事件监听(用于子类重写)
|
--添加事件监听(用于子类重写)
|
||||||
|
@ -225,6 +249,7 @@ function RoleEquipPanel:OnOpen(...)
|
||||||
isUpZhen = data[4]
|
isUpZhen = data[4]
|
||||||
end
|
end
|
||||||
function RoleEquipPanel:OnShow()
|
function RoleEquipPanel:OnShow()
|
||||||
|
isPlayAnim = true
|
||||||
for i = 1, #heroListData do
|
for i = 1, #heroListData do
|
||||||
if curHeroData == heroListData[i] then
|
if curHeroData == heroListData[i] then
|
||||||
index = i
|
index = i
|
||||||
|
@ -587,6 +612,11 @@ function this.ShowHeroEquip()
|
||||||
else
|
else
|
||||||
refineObj:SetActive(false)
|
refineObj:SetActive(false)
|
||||||
end
|
end
|
||||||
|
if i==5 then
|
||||||
|
this.equipBTn5Add:SetActive(false)
|
||||||
|
elseif i==6 then
|
||||||
|
this.equipBtn6Add:SetActive(false)
|
||||||
|
end
|
||||||
else
|
else
|
||||||
Util.GetGameObject(go.transform, "frame"):SetActive(false)
|
Util.GetGameObject(go.transform, "frame"):SetActive(false)
|
||||||
Util.GetGameObject(go.transform, "mask"):SetActive(true)
|
Util.GetGameObject(go.transform, "mask"):SetActive(true)
|
||||||
|
@ -599,6 +629,11 @@ function this.ShowHeroEquip()
|
||||||
if refineObj then
|
if refineObj then
|
||||||
refineObj:SetActive(false)
|
refineObj:SetActive(false)
|
||||||
end
|
end
|
||||||
|
if i==5 then
|
||||||
|
this.equipBTn5Add:SetActive(true)
|
||||||
|
elseif i==6 then
|
||||||
|
this.equipBtn6Add:SetActive(true)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
local iconBtn = Util.GetGameObject(go.transform, "icon")
|
local iconBtn = Util.GetGameObject(go.transform, "icon")
|
||||||
Util.AddOnceClick(
|
Util.AddOnceClick(
|
||||||
|
@ -741,11 +776,28 @@ function this:SetItemData(_itemDatas)
|
||||||
this.SingleItemDataShow(go, _itemDatas[index])
|
this.SingleItemDataShow(go, _itemDatas[index])
|
||||||
end
|
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
|
end
|
||||||
function this.SingleItemDataShow(_go, _itemData)
|
function this.SingleItemDataShow(_go, _itemData)
|
||||||
if not itemConfig[_itemData.id] then
|
if not itemConfig[_itemData.id] then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
if isPlayAnim then
|
||||||
|
_go.gameObject:SetActive(false)
|
||||||
|
else
|
||||||
|
_go.gameObject:SetActive(true)
|
||||||
|
end
|
||||||
local frame = Util.GetGameObject(_go.transform, "frame"):GetComponent("Image")
|
local frame = Util.GetGameObject(_go.transform, "frame"):GetComponent("Image")
|
||||||
local icon = Util.GetGameObject(_go.transform, "icon"):GetComponent("Image")
|
local icon = Util.GetGameObject(_go.transform, "icon"):GetComponent("Image")
|
||||||
local name = Util.GetGameObject(_go.transform, "name"):GetComponent("Text")
|
local name = Util.GetGameObject(_go.transform, "name"):GetComponent("Text")
|
||||||
|
@ -1035,6 +1087,10 @@ function this.SelectImageSetParent(_objPoint)
|
||||||
end
|
end
|
||||||
--界面关闭时调用(用于子类重写)
|
--界面关闭时调用(用于子类重写)
|
||||||
function RoleEquipPanel:OnClose()
|
function RoleEquipPanel:OnClose()
|
||||||
|
if isFristOpenTime then
|
||||||
|
isFristOpenTime:Stop()
|
||||||
|
isFristOpenTime = nil
|
||||||
|
end
|
||||||
end
|
end
|
||||||
function this:AddRedPointVale(_equipDatas)
|
function this:AddRedPointVale(_equipDatas)
|
||||||
for j = 1, #_equipDatas do
|
for j = 1, #_equipDatas do
|
||||||
|
|
Loading…
Reference in New Issue