【云游商人】选中武器点确定,再选中护甲点取消,最后合成的是护甲
parent
a5b8dc1de9
commit
1e7142008c
|
@ -31,6 +31,7 @@ end
|
|||
|
||||
function this:BindEvent()
|
||||
Util.AddClick(this.confirm,function()
|
||||
data.otherData.selectId = self.selectId
|
||||
parent:ClosePanel()
|
||||
if func then
|
||||
func()
|
||||
|
@ -54,6 +55,7 @@ function this:OnShow(_parent,...)
|
|||
local _args = {...}
|
||||
data = _args[1]
|
||||
func = _args[2]
|
||||
self.selectId = data.otherData.selectId
|
||||
|
||||
local list = BagManager.GetBagItemDataByItemType(ItemBaseType.Equip)
|
||||
local EquipedEquipList = HeroManager.GetEquipedEquipList()
|
||||
|
@ -119,19 +121,19 @@ function this:ShowSingleData(item,sdata,index)
|
|||
self.itemList[index].gameObject:SetActive(true)
|
||||
self.maskList[index] = itemmask
|
||||
self.maskImageList[index] = maskImage
|
||||
self.maskImageList[index]:SetActive(data.otherData.selectId == sdata.Id)
|
||||
self.maskImageList[index]:SetActive(self.selectId == sdata.Id)
|
||||
|
||||
|
||||
Util.AddOnceClick(self.maskList[index],function ()
|
||||
for i = 1, #self.maskImageList do
|
||||
self.maskImageList[i]:SetActive(false)
|
||||
end
|
||||
if data.otherData.selectId == sdata.Id then
|
||||
if self.selectId == sdata.Id then
|
||||
self.maskImageList[index]:SetActive(false)
|
||||
data.otherData.selectId = 0
|
||||
self.selectId = 0
|
||||
else
|
||||
self.maskImageList[index]:SetActive(true)
|
||||
data.otherData.selectId = sdata.Id
|
||||
self.selectId = sdata.Id
|
||||
end
|
||||
end)
|
||||
Util.AddOnceClick(equiped,function ()
|
||||
|
@ -140,6 +142,7 @@ function this:ShowSingleData(item,sdata,index)
|
|||
end
|
||||
|
||||
function this:OnClose()
|
||||
self.selectId = nil
|
||||
self.equipList={}
|
||||
self.maskList = {}
|
||||
self.maskImageList = {}
|
||||
|
|
Loading…
Reference in New Issue