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