四元阵 报错修改

dev_chengFeng
DESKTOP-98AVA47\Administrator 2021-07-19 21:35:11 +08:00
parent 06cf7f6cdd
commit ee84f39794
2 changed files with 18 additions and 11 deletions

View File

@ -46,6 +46,7 @@ end
function ElementDrawCardPanelNew:BindEvent() function ElementDrawCardPanelNew:BindEvent()
Util.AddClick(self.buyOneBtn, function () Util.AddClick(self.buyOneBtn, function ()
local index = self.index > 0 and self.index or RecruitManager.recruitSubIndex
local singleConfig = ConfigManager.TryGetConfigDataByThreeKey(ConfigName.LotterySetting,"LotteryType",TableRecruitType.Siyuanzhen,"PropertyType",self.index,"PerCount",1) local singleConfig = ConfigManager.TryGetConfigDataByThreeKey(ConfigName.LotterySetting,"LotteryType",TableRecruitType.Siyuanzhen,"PropertyType",self.index,"PerCount",1)
local costnum = singleConfig.CostItem[1][2] local costnum = singleConfig.CostItem[1][2]
local costId = singleConfig.CostItem[1][1] local costId = singleConfig.CostItem[1][1]
@ -86,6 +87,7 @@ function ElementDrawCardPanelNew:BindEvent()
for i = 1, #self.itemPos do for i = 1, #self.itemPos do
Util.AddClick(self.itemPos[i].go, function() Util.AddClick(self.itemPos[i].go, function()
self.index = i self.index = i
RecruitManager.recruitSubIndex = i
self:BtnAction(i) self:BtnAction(i)
end) end)
end end

View File

@ -151,21 +151,27 @@ function RecruitMainPanel:BindEvent()
end) end)
Util.AddClick(this.leftBtn, function() Util.AddClick(this.leftBtn, function()
this.mask:SetActive(true) this.mask:SetActive(true)
this.MoveTo(3) self.thread = coroutine.start(function()
Timer.New(function() coroutine.wait(0.01)
this.MoveTo(3)
coroutine.wait(0.25)
this.SortItemList() this.SortItemList()
coroutine.wait(0.01)
this:LeftAction() this:LeftAction()
this.mask:SetActive(false) this.mask:SetActive(false)
end,0.23):Start() end)
end) end)
Util.AddClick(this.rightBtn, function() Util.AddClick(this.rightBtn, function()
this.mask:SetActive(true) this.mask:SetActive(true)
this.MoveTo(2) self.thread = coroutine.start(function()
Timer.New(function() coroutine.wait(0.01)
this.MoveTo(2)
coroutine.wait(0.25)
this.SortItemList() this.SortItemList()
coroutine.wait(0.01)
this:RightAction() this:RightAction()
this.mask:SetActive(false) this.mask:SetActive(false)
end,0.23):Start() end)
end) end)
Util.AddClick(this.jiantouyou , function() Util.AddClick(this.jiantouyou , function()
@ -352,11 +358,10 @@ function this:SetIndex()
isenter = false isenter = false
this.mask:SetActive(true) this.mask:SetActive(true)
this.MoveTo(LOY) this.MoveTo(LOY)
Timer.New(function() coroutine.wait(0.25)
offSet = offSet - 1 offSet = offSet - 1
this.SortItemList() this.SortItemList()
isenter = true isenter = true
end,0.25):Start()
end end
coroutine.wait(0.01) coroutine.wait(0.01)
end end