探索界面保存编队逻辑优化
parent
2d95eddb30
commit
99ae5cb8ec
|
@ -1,6 +1,6 @@
|
|||
----- 关卡 -----
|
||||
local CarbonFormation = {}
|
||||
local this = CarbonFormation
|
||||
local ExploreFormation = {}
|
||||
local this = ExploreFormation
|
||||
local mainLevelConfig = ConfigManager.GetConfig(ConfigName.MainLevelConfig)
|
||||
local SpecialConfig = ConfigManager.GetConfigData(ConfigName.SpecialConfig,141)
|
||||
--- 是否需要切换编队的功能
|
||||
|
@ -64,18 +64,15 @@ function this.GetOneKeyUpHeroList()
|
|||
end
|
||||
|
||||
--- btn1点击回调事件
|
||||
function this.On_Btn2_Click()
|
||||
function this.On_Btn2_Click(formationId)
|
||||
if not hadClick then
|
||||
hadClick = true
|
||||
for k,v in pairs(this.FormationData) do
|
||||
if k == this.GetFormationIndex() then
|
||||
FormationManager.SaveFormation(k, this.root.choosedList,
|
||||
FormationManager.formationList[k].teamPokemonInfos)
|
||||
else
|
||||
FormationManager.SaveFormation(k, v.formationinfo,
|
||||
FormationManager.formationList[k].teamPokemonInfos)
|
||||
end
|
||||
if this.FormationData[formationId] then
|
||||
local formationinfo=this.FormationData[formationId].formationinfo
|
||||
local teamPokemonInfos=FormationManager.formationList[formationId].teamPokemonInfos
|
||||
FormationManager.SaveFormation(formationId,formationinfo,teamPokemonInfos)
|
||||
end
|
||||
|
||||
end
|
||||
this.root:ClosePanel()
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue