神将置换 上阵英雄不可以置换调整

(cherry picked from commit 0b5a3539ab6fe191b7e1497f32e2e6d3285e21ef)
dev_chengFeng
ZhangBiao 2020-08-12 17:02:02 +08:00
parent 809e10df79
commit 5304368d56
3 changed files with 32 additions and 12 deletions

View File

@ -294,8 +294,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -51.9, y: 0} m_AnchoredPosition: {x: -71, y: 6}
m_SizeDelta: {x: 100, y: 100} m_SizeDelta: {x: 150, y: 150}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4479583077528819432 --- !u!222 &4479583077528819432
CanvasRenderer: CanvasRenderer:
@ -325,7 +325,7 @@ MonoBehaviour:
m_Calls: [] m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: de6cd38183296a14c8a07417420b1763, type: 3} m_Sprite: {fileID: 21300000, guid: 5b66d1c9ba827e84594d3e818587992c, type: 3}
m_Type: 0 m_Type: 0
m_PreserveAspect: 0 m_PreserveAspect: 0
m_FillCenter: 1 m_FillCenter: 1
@ -5001,11 +5001,11 @@ MonoBehaviour:
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData: m_FontData:
m_Font: {fileID: 12800000, guid: 4b73e9e4512d17e4daeea351e090d33c, type: 3} m_Font: {fileID: 12800000, guid: 4b73e9e4512d17e4daeea351e090d33c, type: 3}
m_FontSize: 35 m_FontSize: 45
m_FontStyle: 0 m_FontStyle: 0
m_BestFit: 0 m_BestFit: 0
m_MinSize: 3 m_MinSize: 3
m_MaxSize: 40 m_MaxSize: 45
m_Alignment: 3 m_Alignment: 3
m_AlignByGeometry: 0 m_AlignByGeometry: 0
m_RichText: 1 m_RichText: 1

View File

@ -102,12 +102,32 @@ function this.RefreshFormation(index, roleList, pokemonList,isDiffmonster)
if not curFormation or #this.formationList == 0 then if not curFormation or #this.formationList == 0 then
return return
end end
local newTeamheroInfos = {}
for i = 1, #roleList do
newTeamheroInfos[roleList[i].heroId] = roleList[i]
end
local oldTeamheroInfos = {}
for i = 1, #curFormation.teamHeroInfos do
oldTeamheroInfos[curFormation.teamHeroInfos[i].heroId] = curFormation.teamHeroInfos[i]
if not newTeamheroInfos[curFormation.teamHeroInfos[i].heroId] then
HeroManager.SetHeroFormationList(curFormation.teamHeroInfos[i].heroId,this.formationList[index].teamId,nil)
end
end
curFormation.teamHeroInfos = {} curFormation.teamHeroInfos = {}
for i = 1, #roleList do for i = 1, #roleList do
local teamInfo = {} local teamInfo = {}
teamInfo.heroId = roleList[i].heroId--roleList[i] teamInfo.heroId = roleList[i].heroId--roleList[i]
teamInfo.position = roleList[i].position--i teamInfo.position = roleList[i].position--i
table.insert(curFormation.teamHeroInfos, teamInfo) table.insert(curFormation.teamHeroInfos, teamInfo)
if not oldTeamheroInfos[teamInfo.heroId] then
HeroManager.SetHeroFormationList(roleList[i].heroId,this.formationList[index].teamId,1)
end
end end
curFormation.teamPokemonInfos = {} curFormation.teamPokemonInfos = {}
for j = 1, #pokemonList do for j = 1, #pokemonList do

View File

@ -794,13 +794,13 @@ function this:BindEvent()
--神将合成、神将置换 --神将合成、神将置换
Util.AddClick(this.btnCompoundHero, function() Util.AddClick(this.btnCompoundHero, function()
-- if ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.COMPOUND_HERO) then if ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.COMPOUND_HERO) then
-- JumpManager.GoJump(74) JumpManager.GoJump(74)
-- this.ScenceBtnClick(FUNCTION_OPEN_TYPE.COMPOUND_HERO) this.ScenceBtnClick(FUNCTION_OPEN_TYPE.COMPOUND_HERO)
-- else else
-- PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(FUNCTION_OPEN_TYPE.COMPOUND_HERO)) PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(FUNCTION_OPEN_TYPE.COMPOUND_HERO))
-- end end
UIManager.OpenPanel(UIName.CompoundHeroPanel)--开发用,之后删除 释放上面 -- UIManager.OpenPanel(UIName.CompoundHeroPanel)--开发用,之后删除 释放上面
end) end)
this.BindRedPoint() this.BindRedPoint()