四元阵跳转修改
parent
e44449391d
commit
a4281ed031
|
@ -293,7 +293,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)
|
UIManager.OpenPanel(UIName.ElementDrawCardPanel,(data and data[1] or 0))
|
||||||
end,
|
end,
|
||||||
[JumpType.Pray] = function(data)--云梦
|
[JumpType.Pray] = function(data)--云梦
|
||||||
if ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.Pray) then
|
if ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.Pray) then
|
||||||
|
|
|
@ -261,7 +261,6 @@ function RewardItemSingleShowPopup:OnOpen(...)
|
||||||
isNoShowSureBtn = data[4] and data[4] or false
|
isNoShowSureBtn = data[4] and data[4] or false
|
||||||
end
|
end
|
||||||
function RewardItemSingleShowPopup:OnShow()
|
function RewardItemSingleShowPopup:OnShow()
|
||||||
LogGreen("1111111111111111111111111111")
|
|
||||||
this.itemName.text = GetStringByEquipQua(itemConfigData.Quantity, GetLanguageStrById(itemConfigData.Name))
|
this.itemName.text = GetStringByEquipQua(itemConfigData.Quantity, GetLanguageStrById(itemConfigData.Name))
|
||||||
--判断自选宝箱界面是否开启
|
--判断自选宝箱界面是否开启
|
||||||
local isBoxOpen = UIManager.IsOpen(314)
|
local isBoxOpen = UIManager.IsOpen(314)
|
||||||
|
|
|
@ -11,6 +11,7 @@ local itemConfig=ConfigManager.GetConfig(ConfigName.ItemConfig)
|
||||||
local itemId=20 --元素神符
|
local itemId=20 --元素神符
|
||||||
--初始化组件(用于子类重写)
|
--初始化组件(用于子类重写)
|
||||||
function ElementDrawCardPanel:InitComponent()
|
function ElementDrawCardPanel:InitComponent()
|
||||||
|
this.getCardPanelList = {}
|
||||||
this.spLoader = SpriteLoader.New()
|
this.spLoader = SpriteLoader.New()
|
||||||
orginLayer = 0
|
orginLayer = 0
|
||||||
this.btnBack=Util.GetGameObject(self.gameObject, "enterCardPanel/btnBack")
|
this.btnBack=Util.GetGameObject(self.gameObject, "enterCardPanel/btnBack")
|
||||||
|
@ -36,6 +37,10 @@ function ElementDrawCardPanel:InitComponent()
|
||||||
this.getCardPanel2=Util.GetGameObject(self.transform, "getCardPanel2")
|
this.getCardPanel2=Util.GetGameObject(self.transform, "getCardPanel2")
|
||||||
this.getCardPanel3=Util.GetGameObject(self.transform, "getCardPanel3")
|
this.getCardPanel3=Util.GetGameObject(self.transform, "getCardPanel3")
|
||||||
this.getCardPanel4=Util.GetGameObject(self.transform, "getCardPanel4")
|
this.getCardPanel4=Util.GetGameObject(self.transform, "getCardPanel4")
|
||||||
|
table.insert(this.getCardPanelList,this.getCardPanel1)
|
||||||
|
table.insert(this.getCardPanelList,this.getCardPanel2)
|
||||||
|
table.insert(this.getCardPanelList,this.getCardPanel3)
|
||||||
|
table.insert(this.getCardPanelList,this.getCardPanel4)
|
||||||
-- this.getCardPanel5=Util.GetGameObject(self.transform, "getCardPanel5")
|
-- this.getCardPanel5=Util.GetGameObject(self.transform, "getCardPanel5")
|
||||||
this.getCardPanelBtnBack1=Util.GetGameObject(self.transform, "getCardPanel1/btnBack")
|
this.getCardPanelBtnBack1=Util.GetGameObject(self.transform, "getCardPanel1/btnBack")
|
||||||
this.getCardPanelBtnBack2=Util.GetGameObject(self.transform, "getCardPanel2/btnBack")
|
this.getCardPanelBtnBack2=Util.GetGameObject(self.transform, "getCardPanel2/btnBack")
|
||||||
|
@ -141,52 +146,16 @@ function ElementDrawCardPanel:BindEvent()
|
||||||
-- end)
|
-- end)
|
||||||
|
|
||||||
Util.AddClick(this.itemBtn1, function ()
|
Util.AddClick(this.itemBtn1, function ()
|
||||||
this.getCardPanel1:SetActive(true)
|
this:BtnAction(1,this.getCardPanel1)
|
||||||
this.getCardPanel2:SetActive(false)
|
|
||||||
this.getCardPanel3:SetActive(false)
|
|
||||||
this.getCardPanel4:SetActive(false)
|
|
||||||
-- this.getCardPanel5:SetActive(false)
|
|
||||||
this.getCardPanel1:GetComponent("PlayFlyAnim"):PlayAnim(true)
|
|
||||||
this.effect:SetActive(true)
|
|
||||||
-- 音效
|
|
||||||
SoundManager.PlaySound(SoundConfig.Sound_syz)
|
|
||||||
SoundManager.PlayMusic(SoundConfig.Sound_syz_loop)
|
|
||||||
end)
|
end)
|
||||||
Util.AddClick(this.itemBtn2, function ()
|
Util.AddClick(this.itemBtn2, function ()
|
||||||
this.getCardPanel1:SetActive(false)
|
this:BtnAction(2,this.getCardPanel2)
|
||||||
this.getCardPanel2:SetActive(true)
|
|
||||||
this.getCardPanel3:SetActive(false)
|
|
||||||
this.getCardPanel4:SetActive(false)
|
|
||||||
-- this.getCardPanel5:SetActive(false)
|
|
||||||
this.getCardPanel2:GetComponent("PlayFlyAnim"):PlayAnim(true)
|
|
||||||
this.effect:SetActive(true)
|
|
||||||
-- 音效
|
|
||||||
SoundManager.PlaySound(SoundConfig.Sound_syz)
|
|
||||||
SoundManager.PlayMusic(SoundConfig.Sound_syz_loop)
|
|
||||||
end)
|
end)
|
||||||
Util.AddClick(this.itemBtn3, function ()
|
Util.AddClick(this.itemBtn3, function ()
|
||||||
this.getCardPanel1:SetActive(false)
|
this:BtnAction(3,this.getCardPanel3)
|
||||||
this.getCardPanel2:SetActive(false)
|
|
||||||
this.getCardPanel3:SetActive(true)
|
|
||||||
this.getCardPanel4:SetActive(false)
|
|
||||||
-- this.getCardPanel5:SetActive(false)
|
|
||||||
this.getCardPanel3:GetComponent("PlayFlyAnim"):PlayAnim(true)
|
|
||||||
this.effect:SetActive(true)
|
|
||||||
-- 音效
|
|
||||||
SoundManager.PlaySound(SoundConfig.Sound_syz)
|
|
||||||
SoundManager.PlayMusic(SoundConfig.Sound_syz_loop)
|
|
||||||
end)
|
end)
|
||||||
Util.AddClick(this.itemBtn4, function ()
|
Util.AddClick(this.itemBtn4, function ()
|
||||||
this.getCardPanel1:SetActive(false)
|
this:BtnAction(4,this.getCardPanel4)
|
||||||
this.getCardPanel2:SetActive(false)
|
|
||||||
this.getCardPanel3:SetActive(false)
|
|
||||||
this.getCardPanel4:SetActive(true)
|
|
||||||
-- this.getCardPanel5:SetActive(false)
|
|
||||||
this.getCardPanel4:GetComponent("PlayFlyAnim"):PlayAnim(true)
|
|
||||||
this.effect:SetActive(true)
|
|
||||||
-- 音效
|
|
||||||
-- SoundManager.PlaySound(SoundConfig.Sound_syz)
|
|
||||||
SoundManager.PlayMusic(SoundConfig.Sound_syz_loop)
|
|
||||||
end)
|
end)
|
||||||
-- Util.AddClick(this.itemBtn5, function ()
|
-- Util.AddClick(this.itemBtn5, function ()
|
||||||
-- this.getCardPanel1:SetActive(false)
|
-- this.getCardPanel1:SetActive(false)
|
||||||
|
@ -236,6 +205,22 @@ function ElementDrawCardPanel:BindEvent()
|
||||||
UIManager.OpenPanel(UIName.CompoundHeroPanel,2)
|
UIManager.OpenPanel(UIName.CompoundHeroPanel,2)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function ElementDrawCardPanel:BtnAction(index)
|
||||||
|
this.getCardPanel1:SetActive(index == 1)
|
||||||
|
this.getCardPanel2:SetActive(index == 2)
|
||||||
|
this.getCardPanel3:SetActive(index == 3)
|
||||||
|
this.getCardPanel4:SetActive(index == 4)
|
||||||
|
if index == 0 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
-- this.getCardPanel5:SetActive(false)
|
||||||
|
this.getCardPanelList[index]:GetComponent("PlayFlyAnim"):PlayAnim(true)
|
||||||
|
this.effect:SetActive(true)
|
||||||
|
-- 音效
|
||||||
|
SoundManager.PlaySound(SoundConfig.Sound_syz)
|
||||||
|
SoundManager.PlayMusic(SoundConfig.Sound_syz_loop)
|
||||||
|
end
|
||||||
--添加事件监听(用于子类重写)
|
--添加事件监听(用于子类重写)
|
||||||
function ElementDrawCardPanel:AddListener()
|
function ElementDrawCardPanel:AddListener()
|
||||||
Game.GlobalEvent:AddEvent(GameEvent.SecretBox.OnOpenOneReward, this.OpenOneRewardPanel)
|
Game.GlobalEvent:AddEvent(GameEvent.SecretBox.OnOpenOneReward, this.OpenOneRewardPanel)
|
||||||
|
@ -265,6 +250,8 @@ function ElementDrawCardPanel:OnOpen(...)
|
||||||
local parent = Util.GetGameObject(self.transform, "getCardPanel"..i.."/content1/Image/Image (1)/Image (1)")
|
local parent = Util.GetGameObject(self.transform, "getCardPanel"..i.."/content1/Image/Image (1)/Image (1)")
|
||||||
SetTextVerTial(Util.GetGameObject(parent, "Text"),Vector3.New(134.88,-5.9,0),"MiddleLeft")
|
SetTextVerTial(Util.GetGameObject(parent, "Text"),Vector3.New(134.88,-5.9,0),"MiddleLeft")
|
||||||
end
|
end
|
||||||
|
local args = {...}
|
||||||
|
this.index = args[1] or 0
|
||||||
end
|
end
|
||||||
|
|
||||||
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
|
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
|
||||||
|
@ -277,6 +264,8 @@ function ElementDrawCardPanel:OnShow()
|
||||||
Util.GetGameObject(this.getCardPanel2, "content2/btn1/Text"):GetComponent("Text").fontSize = GetCurLanguage() ~= 2 and 38 or 30
|
Util.GetGameObject(this.getCardPanel2, "content2/btn1/Text"):GetComponent("Text").fontSize = GetCurLanguage() ~= 2 and 38 or 30
|
||||||
Util.GetGameObject(this.getCardPanel3, "content2/btn1/Text"):GetComponent("Text").fontSize = GetCurLanguage() ~= 2 and 38 or 30
|
Util.GetGameObject(this.getCardPanel3, "content2/btn1/Text"):GetComponent("Text").fontSize = GetCurLanguage() ~= 2 and 38 or 30
|
||||||
Util.GetGameObject(this.getCardPanel4, "content2/btn1/Text"):GetComponent("Text").fontSize = GetCurLanguage() ~= 2 and 38 or 30
|
Util.GetGameObject(this.getCardPanel4, "content2/btn1/Text"):GetComponent("Text").fontSize = GetCurLanguage() ~= 2 and 38 or 30
|
||||||
|
|
||||||
|
this:BtnAction(this.index)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ function JumpViewNew:OnOpen(jumpId,heroConfig,parent)
|
||||||
self.costIconPos.gameObject:SetActive(false)
|
self.costIconPos.gameObject:SetActive(false)
|
||||||
self.desc.text = "设为心愿神将会有更高概率"
|
self.desc.text = "设为心愿神将会有更高概率"
|
||||||
elseif self.jumpSData.Type == JumpType.ElementDrawCard then
|
elseif self.jumpSData.Type == JumpType.ElementDrawCard then
|
||||||
self.info.text = GetLanguageStrById(self.jumpSData.Title).."·"..HeroElementDef[heroConfig.PropertyName]
|
self.info.text = GetLanguageStrById(self.jumpSData.Title)
|
||||||
self.costIconPos.gameObject:SetActive(false)
|
self.costIconPos.gameObject:SetActive(false)
|
||||||
self.desc.text = "抽取时额外赠送元神玉"
|
self.desc.text = "抽取时额外赠送元神玉"
|
||||||
elseif self.jumpSData.Type == JumpType.ZhuTiHuoDong then
|
elseif self.jumpSData.Type == JumpType.ZhuTiHuoDong then
|
||||||
|
|
Loading…
Reference in New Issue