归元时检测大闹天宫队伍的神将
parent
2ecf69827f
commit
f8abe77d82
|
@ -5,7 +5,7 @@ local this = SaveFormation
|
|||
this.IsNeedChangeFormation = true
|
||||
|
||||
--- 逻辑初始化
|
||||
function this.Init(root)
|
||||
function this.Init(root,...)
|
||||
this.root = root
|
||||
this.root.bg:SetActive(true)
|
||||
this.root.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.Main })
|
||||
|
@ -13,10 +13,12 @@ function this.Init(root)
|
|||
this.root.btn_2:SetActive(true)
|
||||
this.root.btn_1_lab.text=Language[10743]
|
||||
this.root.btn_2_lab.text=Language[10726]
|
||||
local temp = {...}
|
||||
this.teamId = temp[1]
|
||||
end
|
||||
--- 获取需要显示的编队id
|
||||
function this.GetFormationIndex()
|
||||
return FormationManager.curFormationIndex
|
||||
return this.teamId and this.teamId or FormationManager.curFormationIndex
|
||||
end
|
||||
|
||||
--- 关闭界面事件
|
||||
|
@ -30,12 +32,14 @@ function this.On_Btn1_Click()
|
|||
end
|
||||
function this.On_Btn2_Click()
|
||||
if this.root.order>=1 then
|
||||
--保存编队
|
||||
FormationManager.RefreshFormation(this.root.curFormationIndex, this.root.choosedList,
|
||||
FormationManager.formationList[this.root.curFormationIndex].teamPokemonInfos)
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Formation.OnFormationChange) --主线保存编队显示战力变化
|
||||
PopupTipPanel.ShowTip(Language[10713])
|
||||
this.root:ClosePanel()
|
||||
FormationManager.RefreshFormation(this.root.curFormationIndex, this.root.choosedList,
|
||||
FormationManager.formationList[this.root.curFormationIndex].teamPokemonInfos)
|
||||
PopupTipPanel.ShowTip(Language[10713])
|
||||
this.root:ClosePanel()
|
||||
if this.teamId and this.teamId == FormationTypeDef.EXPEDITION then
|
||||
else
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Formation.OnFormationChange) --主线保存编队显示战力变化
|
||||
end
|
||||
else
|
||||
PopupTipPanel.ShowTip(string.format(Language[10701], 1))
|
||||
end
|
||||
|
|
|
@ -210,6 +210,8 @@ function this.SingleHeroDataShow(go,_heroData)
|
|||
JumpManager.GoJump(8001)
|
||||
elseif heroData.isFormations[1] == FormationTypeDef.FORMATION_ENDLESS_MAP then
|
||||
JumpManager.GoJump(57001)
|
||||
elseif heroData.isFormations[1] == FormationTypeDef.EXPEDITION then
|
||||
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.SAVE_FORMATION,FormationTypeDef.EXPEDITION)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
|
Loading…
Reference in New Issue