界面适配 跳转竞技场进攻阵容检测

zhangqiang 2020-08-15 19:02:20 +08:00
parent 19a2229fb8
commit ce7c70820b
2 changed files with 20 additions and 20 deletions

View File

@ -305,9 +305,9 @@ RectTransform:
m_Father: {fileID: 8485517753741111699}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 0}
m_AnchoredPosition: {x: 0, y: 81.09961}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: -878.9004}
m_SizeDelta: {x: 348, y: 44}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &624247546002579982
@ -902,10 +902,10 @@ RectTransform:
m_Father: {fileID: 8485517753741111699}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 1080, y: 1920}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8487183040723315029
CanvasRenderer:

View File

@ -47,23 +47,23 @@ local jumpDic = {
end
end,
[JumpType.Arena] = function(data)--竞技场
local arenaDefend = FormationManager.GetFormationByID(FormationTypeDef.FORMATION_ARENA_DEFEND)
-- local arenaDefend = FormationManager.GetFormationByID(FormationTypeDef.FORMATION_ARENA_DEFEND)
local arenaAttack = FormationManager.GetFormationByID(FormationTypeDef.FORMATION_ARENA_ATTACK)
--首次进入竞技场 将主线编队复制到竞技场防守、进攻编队
if #arenaAttack.teamHeroInfos==0 then
-- LogColor("red","竞技进攻编队为空")
local formation = FormationManager.GetFormationByID(FormationTypeDef.FORMATION_NORMAL)
local newFormation = {}
for index = 1, #formation.teamHeroInfos do
local teamInfo = formation.teamHeroInfos[index]
local singleData = {}
singleData.heroId = teamInfo.heroId
singleData.position = index
table.insert(newFormation, singleData)
end
FormationManager.RefreshFormation(FormationTypeDef.FORMATION_ARENA_ATTACK,newFormation,formation.teamPokemonInfos)
end
-- if #arenaAttack.teamHeroInfos==0 then
-- -- LogColor("red","竞技进攻编队为空")
-- local formation = FormationManager.GetFormationByID(FormationTypeDef.FORMATION_NORMAL)
-- local newFormation = {}
-- for index = 1, #formation.teamHeroInfos do
-- local teamInfo = formation.teamHeroInfos[index]
-- local singleData = {}
-- singleData.heroId = teamInfo.heroId
-- singleData.position = index
-- table.insert(newFormation, singleData)
-- end
-- FormationManager.RefreshFormation(FormationTypeDef.FORMATION_ARENA_ATTACK,newFormation,formation.teamPokemonInfos)
-- end
if #arenaDefend.teamHeroInfos == 0 then
-- LogColor("red","竞技防守编队为空")
local formation = FormationManager.GetFormationByID(FormationTypeDef.FORMATION_NORMAL)