Merge remote-tracking branch 'origin/china/dev' into china/zf_test
commit
437e41c130
|
|
@ -8,7 +8,8 @@ end
|
||||||
local jumpDic = {
|
local jumpDic = {
|
||||||
[JumpType.Lottery] = function(data)--招募
|
[JumpType.Lottery] = function(data)--招募
|
||||||
--local openPanle =
|
--local openPanle =
|
||||||
UIManager.OpenPanel(UIName.RecruitPanel)
|
local config = ConfigManager.TryGetConfigDataByThreeKey(ConfigName.ActivityGroups,"Sort",data.skipfactor[1],"FunType",JumpType.Lottery,"PageType",JumpType.Lottery)
|
||||||
|
UIManager.OpenPanel(UIName.RecruitMainPanel,config.ShopData[1][1])
|
||||||
--if openPanle and data then
|
--if openPanle and data then
|
||||||
-- openPanle.ShowGuideGo(data[1])
|
-- openPanle.ShowGuideGo(data[1])
|
||||||
--end
|
--end
|
||||||
|
|
@ -302,7 +303,7 @@ local jumpDic = {
|
||||||
UIManager.OpenPanel(UIName.QuickPurchasePanel, { type = UpViewRechargeType.Gold })
|
UIManager.OpenPanel(UIName.QuickPurchasePanel, { type = UpViewRechargeType.Gold })
|
||||||
end,
|
end,
|
||||||
[JumpType.ElementDrawCard] = function(data)--元素招募
|
[JumpType.ElementDrawCard] = function(data)--元素招募
|
||||||
UIManager.OpenPanel(UIName.ElementDrawCardPanel,(data and data[1] or 0))
|
UIManager.OpenPanel(UIName.RecruitMainPanel,TableRecruitType.Siyuanzhen)
|
||||||
end,
|
end,
|
||||||
[JumpType.Pray] = function(data)--云梦
|
[JumpType.Pray] = function(data)--云梦
|
||||||
if ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.Pray) then
|
if ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.Pray) then
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ function ElementDrawCardPanelNew:InitComponent()
|
||||||
self.spLoader = SpriteLoader.New()
|
self.spLoader = SpriteLoader.New()
|
||||||
|
|
||||||
self.getCardPanel = Util.GetGameObject(self.transform, "getCardPanel")
|
self.getCardPanel = Util.GetGameObject(self.transform, "getCardPanel")
|
||||||
|
self.getCardPanel.gameObject:SetActive(false)
|
||||||
self.buyOneBtn = Util.GetGameObject(self.getCardPanel,"content2/btn1")
|
self.buyOneBtn = Util.GetGameObject(self.getCardPanel,"content2/btn1")
|
||||||
self.titleImageText = Util.GetGameObject(self.getCardPanel,"content1/titleImage/Text"):GetComponent("Text")
|
self.titleImageText = Util.GetGameObject(self.getCardPanel,"content1/titleImage/Text"):GetComponent("Text")
|
||||||
self.Image1 = Util.GetGameObject(self.getCardPanel,"content1/Image/Image1"):GetComponent("Image")
|
self.Image1 = Util.GetGameObject(self.getCardPanel,"content1/Image/Image1"):GetComponent("Image")
|
||||||
|
|
@ -46,6 +47,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]
|
||||||
|
|
@ -62,6 +64,7 @@ function ElementDrawCardPanelNew:BindEvent()
|
||||||
|
|
||||||
Util.AddClick(self.btnBack, function ()
|
Util.AddClick(self.btnBack, function ()
|
||||||
self.getCardPanel:SetActive(false)
|
self.getCardPanel:SetActive(false)
|
||||||
|
self.parent.AddTrigger()
|
||||||
self.effect:SetActive(false)
|
self.effect:SetActive(false)
|
||||||
SoundManager.PlayMusic(SoundConfig.BGM_Main)
|
SoundManager.PlayMusic(SoundConfig.BGM_Main)
|
||||||
RecruitManager.recruitSubIndex = 0
|
RecruitManager.recruitSubIndex = 0
|
||||||
|
|
@ -86,6 +89,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
|
||||||
|
|
@ -98,6 +102,7 @@ function ElementDrawCardPanelNew:BtnAction(index)
|
||||||
self.parent.btnBack.gameObject:SetActive(false)
|
self.parent.btnBack.gameObject:SetActive(false)
|
||||||
self.parent.tabbox.gameObject:SetActive(false)
|
self.parent.tabbox.gameObject:SetActive(false)
|
||||||
self.getCardPanel.gameObject:SetActive(true)
|
self.getCardPanel.gameObject:SetActive(true)
|
||||||
|
self.parent.RemoveTrigger()
|
||||||
self.effect:SetActive(true)
|
self.effect:SetActive(true)
|
||||||
self.Image2Text.text = string.format("%s神将碎片",PropertyType[index])
|
self.Image2Text.text = string.format("%s神将碎片",PropertyType[index])
|
||||||
SetTextVerTial(self.Image2Text,Vector3.New(134.88,-5.9,0),"MiddleLeft")
|
SetTextVerTial(self.Image2Text,Vector3.New(134.88,-5.9,0),"MiddleLeft")
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ function RecruitMainPanel:InitComponent()
|
||||||
this.rightBtn = Util.GetGameObject(this.tabbox, "rightAction")
|
this.rightBtn = Util.GetGameObject(this.tabbox, "rightAction")
|
||||||
this.jiantouyou = Util.GetGameObject(this.tabbox, "jiantouyou")
|
this.jiantouyou = Util.GetGameObject(this.tabbox, "jiantouyou")
|
||||||
this.jiantouzuo = Util.GetGameObject(this.tabbox, "jiantouzuo")
|
this.jiantouzuo = Util.GetGameObject(this.tabbox, "jiantouzuo")
|
||||||
this.mask1 = Util.GetGameObject(this.tabbox, "mask"):GetComponent("Image")
|
this.mask1 = Util.GetGameObject(this.tabbox, "mask"):GetComponent("Image")
|
||||||
this.mask2 = Util.GetGameObject(this.tabbox, "mask1"):GetComponent("Image")
|
this.mask2 = Util.GetGameObject(this.tabbox, "mask1"):GetComponent("Image")
|
||||||
this.select = Util.GetGameObject(this.tabbox, "select")
|
this.select = Util.GetGameObject(this.tabbox, "select")
|
||||||
this.selectIma = Util.GetGameObject(this.select, "Image"):GetComponent("Image")
|
this.selectIma = Util.GetGameObject(this.select, "Image"):GetComponent("Image")
|
||||||
|
|
@ -56,8 +56,18 @@ function RecruitMainPanel:InitComponent()
|
||||||
--LogGreen("this.pos0:"..tostring(this.pos0))
|
--LogGreen("this.pos0:"..tostring(this.pos0))
|
||||||
--this.pos4 = Vector3.New(this.off * (4 - 1) + 4 * this.itemWidth,0,0)
|
--this.pos4 = Vector3.New(this.off * (4 - 1) + 4 * this.itemWidth,0,0)
|
||||||
self.lastPage,self.curPage,self.nextPage = 0,0,0
|
self.lastPage,self.curPage,self.nextPage = 0,0,0
|
||||||
|
this.AddTrigger()
|
||||||
|
end
|
||||||
|
|
||||||
this.trigger = Util.GetEventTriggerListener(self.gameObject) --触摸事件
|
function this.RemoveTrigger()
|
||||||
|
this.trigger = Util.GetEventTriggerListener(this.gameObject) --触摸事件
|
||||||
|
this.trigger.onBeginDrag = this.trigger.onBeginDrag - this.OnBeginDrag
|
||||||
|
this.trigger.onDrag = this.trigger.onDrag - this.OnDrag
|
||||||
|
this.trigger.onEndDrag = this.trigger.onEndDrag - this.OnEndDrag
|
||||||
|
end
|
||||||
|
|
||||||
|
function this.AddTrigger()
|
||||||
|
this.trigger = Util.GetEventTriggerListener(this.gameObject) --触摸事件
|
||||||
this.trigger.onBeginDrag = this.trigger.onBeginDrag + this.OnBeginDrag
|
this.trigger.onBeginDrag = this.trigger.onBeginDrag + this.OnBeginDrag
|
||||||
this.trigger.onDrag = this.trigger.onDrag + this.OnDrag
|
this.trigger.onDrag = this.trigger.onDrag + this.OnDrag
|
||||||
this.trigger.onEndDrag = this.trigger.onEndDrag + this.OnEndDrag
|
this.trigger.onEndDrag = this.trigger.onEndDrag + this.OnEndDrag
|
||||||
|
|
@ -151,21 +161,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()
|
||||||
|
|
@ -248,7 +264,6 @@ end
|
||||||
--界面打开时调用(用于子类重写)
|
--界面打开时调用(用于子类重写)
|
||||||
function RecruitMainPanel:OnOpen(_index)
|
function RecruitMainPanel:OnOpen(_index)
|
||||||
if not _index then
|
if not _index then
|
||||||
LogGreen("GuideManager.GetCurId(1):"..tostring(GuideManager.GetCurId(1)).." GuideManager.GetCurId(2):"..tostring(GuideManager.GetCurId(2)))
|
|
||||||
if GuideManager.IsInMainGuide() and GuideManager.GetCurId(1) == 105 then
|
if GuideManager.IsInMainGuide() and GuideManager.GetCurId(1) == 105 then
|
||||||
self.CurRecruitId = TableRecruitType.Putong
|
self.CurRecruitId = TableRecruitType.Putong
|
||||||
elseif GuideManager.IsInMainGuide() and GuideManager.GetCurId(1) == 1003 then
|
elseif GuideManager.IsInMainGuide() and GuideManager.GetCurId(1) == 1003 then
|
||||||
|
|
@ -352,11 +367,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
|
||||||
|
|
@ -372,10 +386,14 @@ end
|
||||||
|
|
||||||
function this:PageOnChange(isShow)
|
function this:PageOnChange(isShow)
|
||||||
if isShow then
|
if isShow then
|
||||||
this.select.transform:SetParent(this.itemList[2].go.transform)
|
for i = 1,#this.itemList do
|
||||||
this.select.transform:GetComponent("RectTransform").anchoredPosition = Vector3.zero
|
if this.itemList[i].pageIndex == self.curPage then
|
||||||
this.select.gameObject:SetActive(true)
|
this.select.transform:SetParent(this.itemList[i].go.transform)
|
||||||
this.selectIma.sprite = this.spLoader:LoadSprite(self.dicData[self.curPage].Icon[2])
|
this.select.transform:GetComponent("RectTransform").anchoredPosition = Vector3.zero
|
||||||
|
this.select.gameObject:SetActive(true)
|
||||||
|
this.selectIma.sprite = this.spLoader:LoadSprite(self.dicData[self.curPage].Icon[2])
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
RecruitManager.CurRecruitId = self.CurRecruitId
|
RecruitManager.CurRecruitId = self.CurRecruitId
|
||||||
if subViewList[lastIndex] and subViewList[lastIndex].config and subViewList[lastIndex].sub then
|
if subViewList[lastIndex] and subViewList[lastIndex].config and subViewList[lastIndex].sub then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue