【战斗回放】

dev_chengFeng
zhangqiang 2021-01-06 16:12:54 +08:00
parent e3ffcb23b8
commit 9f9b2920e3
12 changed files with 333 additions and 52 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -0,0 +1,88 @@
fileFormatVersion: 2
guid: d1f4d20f8566d1a448cb49b4c9ec87a0
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 9
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 2
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: efbd1428f9af8fb4fb43d0f9ad720448
vertices: []
indices:
edges: []
weights: []
spritePackingTag: TagButtonAtlas
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -99519,7 +99519,7 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: 0419fafe394d5064588ee3dd99bf81d9, type: 3}
m_Sprite: {fileID: 21300000, guid: d1f4d20f8566d1a448cb49b4c9ec87a0, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1

View File

@ -19,7 +19,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!224 &8499438029788851756
RectTransform:
m_ObjectHideFlags: 0
@ -36,7 +36,7 @@ RectTransform:
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: -66.2, y: 228}
m_AnchoredPosition: {x: -104, y: 228}
m_SizeDelta: {x: 126, y: 126}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4023450905949159815
@ -67,7 +67,7 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: 0419fafe394d5064588ee3dd99bf81d9, type: 3}
m_Sprite: {fileID: 21300000, guid: d1f4d20f8566d1a448cb49b4c9ec87a0, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
@ -11106,7 +11106,7 @@ RectTransform:
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: -2.6, y: 228}
m_AnchoredPosition: {x: 94, y: 228}
m_SizeDelta: {x: 126, y: 126}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7632774037313775392

View File

@ -3605,7 +3605,7 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: 0419fafe394d5064588ee3dd99bf81d9, type: 3}
m_Sprite: {fileID: 21300000, guid: d1f4d20f8566d1a448cb49b4c9ec87a0, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
@ -4335,7 +4335,7 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: 0419fafe394d5064588ee3dd99bf81d9, type: 3}
m_Sprite: {fileID: 21300000, guid: d1f4d20f8566d1a448cb49b4c9ec87a0, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1

View File

@ -2175,6 +2175,7 @@ BATTLE_TYPE = {
GuildTranscript = 14, -- 公会副本
ARENA = 15, -- 竞技场
XINJIANG = 16, --新将来袭
BACK_BATTLE = 1000, -- 系统战斗回放
}
rankKingList={ [1] = { bgImage = "r_zjm_paihangbang_banner04", name = Language[12164] ,rankType = RANK_TYPE.FIGHT_LEVEL_RANK,activiteId = 0,isRankingMainPanelShow = true},
[2] = { bgImage = "r_zjm_paihangbang_banner02", name = Language[12165] ,rankType = RANK_TYPE.FORCE_CURR_RANK,activiteId = 0,isRankingMainPanelShow = true},

View File

@ -16,7 +16,7 @@ function ArenaResultPopup:InitComponent()
this.loseEffect = Util.GetGameObject(self.transform, "lose/Effect (1)")
this.btnResult = Util.GetGameObject(self.transform, "btnResult")
this.btnBattleBack = Util.GetGameObject(self.transform, "btnBattleBack")
this.btnBattleBack:SetActive(false)
-- this.btnBattleBack:SetActive(false)
screenAdapte(this.winEffect)
screenAdapte(this.loseEffect)
end

View File

@ -9,7 +9,7 @@ local CombatControl = ConfigManager.GetConfig(ConfigName.CombatControl)
local SpiritAnimalSkill = ConfigManager.GetConfig(ConfigName.SpiritAnimalSkill)
local FakeBattleNew = ConfigManager.GetConfig(ConfigName.FakeBattleNew)
local FEAConfig = require("Modules/Battle/Config/FightEffectAudioConfig")
local curFightData = nil
local lastFightData = nil
local function pairsByKeys(t)
local a = {}
for n in pairs(t) do
@ -451,7 +451,8 @@ function this.GetBattleServerData(msg, isFightPlayer)
fightId = msg.fightData.fightId,
}
LogYellow("收到的战斗ID = "..msg.fightData.fightId)
curFightData = data
this.SetLastBattleResult(nil,nil)
lastFightData = data
return data
end
@ -990,14 +991,28 @@ function this.RequestBattleDataByFightId(fightId, func)
end, nil, nil, nil)
end
--普通战斗回访
function this.BattleBackFun(doneFunc,battle_type)
if curFightData then
-- local fightData = BattleManager.GetBattleServerData({fightData = curFightData}, 1)
--新回放功能
local lastBattleResult = nil
local lastBattleType = nil
--设置上次战斗回放数据和类型
function this.SetLastBattleResult(_lastBattleResult,_lastBattleType)
lastBattleResult = _lastBattleResult
lastBattleType = _lastBattleType
end
function this.GetLastBattleResult()
return lastBattleResult
end
function this.GetLastBattleType()
return lastBattleType
end
--新回放功能
function this.BattleBackFun()
if lastFightData then
if UIManager.GetOpenPanel(UIName.BattlePanel) then
UIManager.ClosePanel(UIName.BattlePanel)
end
local battlePanel = UIManager.OpenPanel(UIName.BattlePanel, curFightData, battle_type and battle_type or BATTLE_TYPE.BACK, doneFunc)
UIManager.OpenPanel(UIName.BattlePanel, lastFightData, BATTLE_TYPE.BACK_BATTLE)
end
end

View File

@ -214,7 +214,7 @@ function this:OnOpen(_fightData, _fightType, _endFunc)
fightType = _fightType --判定战斗类型
isBack = _fightType == BATTLE_TYPE.BACK --判定是否是战斗回放
hadCounted = 0
-- LogPink(fightType)
LogPink(fightType)
this.BG:GetComponent("Image").sprite = Util.LoadSprite(BattleManager.GetBattleBg(fightType))
-- this.BtnGM:SetActive(AppConst.isOpenGM)
@ -313,7 +313,7 @@ function this.InitOption()
this.Option:SetActive(true)
Util.GetGameObject(this.BtnTimeScale, "lock"):SetActive(not BattleManager.IsUnlockBattleSpeed())
local IsUnLockBattlePass = BattleManager.IsUnlockBattlePass() or (fightType == BATTLE_TYPE.BACK)--or AppConst.isOpenGM
local IsUnLockBattlePass = BattleManager.IsUnlockBattlePass() or (fightType == BATTLE_TYPE.BACK) or (fightType == BATTLE_TYPE.BACK_BATTLE)--or AppConst.isOpenGM
Util.GetGameObject(this.BtnExit, "lock"):SetActive(not IsUnLockBattlePass)
if AppConst.isOpenGM then
Util.GetGameObject(this.BtnGM, "lock"):SetActive(false)
@ -379,6 +379,7 @@ function this.BattleEnd(result)
else
this.lastBattleResult.lastPos = 0
end
BattleManager.SetLastBattleResult(this.lastBattleResult,fightType)
this.ShowBattleResult(msg.result, msg)
end)
elseif fightType == BATTLE_TYPE.EXECUTE_FIGHT then--远征处理
@ -392,6 +393,7 @@ function this.BattleEnd(result)
end
this.lastBattleResult.result = msg.result
this.lastBattleResult.drop = msg.drop
BattleManager.SetLastBattleResult(this.lastBattleResult,fightType)
this.ShowBattleResult(msg.result, msg)
end)
else
@ -418,6 +420,9 @@ function this.BattleEnd(result)
end
end
-- 直接显示结果
if fightType ~= BATTLE_TYPE.BACK_BATTLE then
BattleManager.SetLastBattleResult(this.lastBattleResult,fightType)
end
this.ShowBattleResult(result)
end
end
@ -492,14 +497,17 @@ function this.ShowBattleResult(result, msg)
-- 胜利显示本场比赛的表现最好的英雄
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup)
-- 打开关卡奖励界面
UIManager.OpenPanel(UIName.RewardItemPopup,GuildTranscriptManager.drop, 1,function()
if _BattleBestPopup then
_BattleBestPopup:ClosePanel()
UIManager.OpenPanel(UIName.RewardItemPopup,GuildTranscriptManager.drop, 1,function(isBackBattle)
LogPink("isBackBattle "..tostring(isBackBattle))
if not isBackBattle then
if _BattleBestPopup then
_BattleBestPopup:ClosePanel()
end
this:ClosePanel()
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.RefreshGuildTranscripQuickBtn)
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.RefreshGuildTranscript)
GuildTranscriptManager.IsKillShowTip()
end
this:ClosePanel()
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.RefreshGuildTranscripQuickBtn)
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.RefreshGuildTranscript)
GuildTranscriptManager.IsKillShowTip()
end, 6,true,true)
end)
end
@ -524,7 +532,40 @@ function this.ShowBattleResult(result, msg)
end, nil, true, true)
end)
end
end, 0.1):Start()
end, 0.1):Start()
--新回放功能
elseif fightType == BATTLE_TYPE.BACK_BATTLE then
if BattleManager.GetLastBattleType() == BATTLE_TYPE.GuildTranscript then
-- 延时执行避免事件冲突
Timer.New(function()
local bestData, allDamage= BattleRecordManager.GetBattleBestData()
if bestData then
-- 胜利显示本场比赛的表现最好的英雄
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup)
-- 打开关卡奖励界面
UIManager.OpenPanel(UIName.RewardItemPopup,GuildTranscriptManager.drop, 1,function(isBackBattle)
LogPink("isBackBattle "..tostring(isBackBattle))
if not isBackBattle then
if _BattleBestPopup then
_BattleBestPopup:ClosePanel()
end
this:ClosePanel()
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.RefreshGuildTranscripQuickBtn)
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.RefreshGuildTranscript)
GuildTranscriptManager.IsKillShowTip()
end
end, 6,true,true)
end)
end
end, 0.1):Start()
else
if result == 0 then -- 失败
local haveRecord = BattleRecordManager.isHaveRecord()
UIManager.OpenPanel(UIName.BattleFailPopup, this, haveRecord,nil,fightType)
else -- 胜利
UIManager.OpenPanel(UIName.BattleWinPopup, this, isBack, fightType, this.lastBattleResult)
end
end
else
if result == 0 then -- 失败
local haveRecord = BattleRecordManager.isHaveRecord()

View File

@ -6,12 +6,13 @@ local m_showRecord = true
local m_backPanel
local orginLayer
local fightType
local isBackBattle = false
--初始化组件(用于子类重写)
function BattleFailPopup:InitComponent()
orginLayer = 0
this.btnClose = Util.GetGameObject(self.gameObject, "Lose")
Util.GetGameObject(this.btnClose, "btnBattleBack"):SetActive(false)
-- Util.GetGameObject(this.btnClose, "btnBattleBack"):SetActive(false)
end
--绑定事件(用于子类重写)
@ -46,6 +47,8 @@ function BattleFailPopup:BindEvent()
--this.ClosePanelRefreshData()
end)
Util.AddClick(Util.GetGameObject(this.btnClose, "btnBattleBack"), function ()
LogGreen("isBackBattle = true")
isBackBattle = true
BattleManager.BattleBackFun()
end)
end
@ -67,7 +70,8 @@ end
--界面打开时调用(用于子类重写)
function BattleFailPopup:OnOpen(battlePanel, showRecord, backPanel,_fightType)
LogGreen("isBackBattle = false")
isBackBattle = false
if battlePanel then
m_battlePanel = battlePanel
end
@ -104,21 +108,41 @@ end
function this.ClosePanelRefreshData()
if fightType then
if fightType == 8 then--远征
local GetCurNodeInfo = ExpeditionManager.curAttackNodeInfo
if GetCurNodeInfo.type == ExpeditionNodeType.Greed then--贪婪节点
Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshMainPanel)--刷新界面
PopupTipPanel.ShowTip( Language[12194])
else
MsgPanel.ShowTwo(Language[11540], function()
end, function()
NetManager.EndConfirmExpeditionBattleRequest(GetCurNodeInfo.sortId, function (msg)
end)
end,Language[10719],Language[12201])
Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshMainPanel)--刷新界面
if not isBackBattle then
local GetCurNodeInfo = ExpeditionManager.curAttackNodeInfo
if GetCurNodeInfo.type == ExpeditionNodeType.Greed then--贪婪节点
Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshMainPanel)--刷新界面
PopupTipPanel.ShowTip( Language[12194])
else
MsgPanel.ShowTwo(Language[11540], function()
end, function()
NetManager.EndConfirmExpeditionBattleRequest(GetCurNodeInfo.sortId, function (msg)
end)
end,Language[10719],Language[12201])
Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshMainPanel)--刷新界面
end
end
elseif fightType == 10 then--车迟
--车迟抢夺cd计时
GuildCarDelayManager.SetCdTime(GuildCarDelayProType.Loot)
--新回放功能
elseif fightType == BATTLE_TYPE.BACK_BATTLE then
if BattleManager.GetLastBattleType() == BATTLE_TYPE.EXECUTE_FIGHT then
if not isBackBattle then
local GetCurNodeInfo = ExpeditionManager.curAttackNodeInfo
if GetCurNodeInfo.type == ExpeditionNodeType.Greed then--贪婪节点
Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshMainPanel)--刷新界面
PopupTipPanel.ShowTip( Language[12194])
else
MsgPanel.ShowTwo(Language[11540], function()
end, function()
NetManager.EndConfirmExpeditionBattleRequest(GetCurNodeInfo.sortId, function (msg)
end)
end,Language[10719],Language[12201])
Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshMainPanel)--刷新界面
end
end
end
end
end
end

View File

@ -89,16 +89,19 @@ function BattleWinPopup:NextStep()
-- 胜利显示本场比赛的表现最好的英雄
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup)
-- 打开关卡奖励界面
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1,function()
if _BattleBestPopup then
_BattleBestPopup:ClosePanel()
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1,function(isBackBattle)
LogPink("isBackBattle "..tostring(isBackBattle))
if not isBackBattle then
if _BattleBestPopup then
_BattleBestPopup:ClosePanel()
end
if m_battlePanel then
m_battlePanel:ClosePanel()
end
self:ClosePanel()
-- 再刷新一便关卡信息
NetManager.InitFightPointLevelInfo()
end
if m_battlePanel then
m_battlePanel:ClosePanel()
end
self:ClosePanel()
-- 再刷新一便关卡信息
NetManager.InitFightPointLevelInfo()
end, 1, true, true)
end)
else
@ -195,6 +198,111 @@ function BattleWinPopup:NextStep()
end, 3,true,true)
end)
end
--新回放功能
elseif m_fightType == BATTLE_TYPE.BACK_BATTLE then
if BattleManager.GetLastBattleType() == BATTLE_TYPE.STORY_FIGHT then
FightPointPassManager.FightBattleEnd()
FightPointPassManager.OnBattleEnd(m_battleResult)
local bestData, allDamage= BattleRecordManager.GetBattleBestData()
if bestData then
-- 胜利显示本场比赛的表现最好的英雄
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup)
-- 打开关卡奖励界面
UIManager.OpenPanel(UIName.RewardItemPopup, BattleManager.GetLastBattleResult().drop, 1,function(isBackBattle)
LogPink("isBackBattle "..tostring(isBackBattle))
if not isBackBattle then
if _BattleBestPopup then
_BattleBestPopup:ClosePanel()
end
if m_battlePanel then
m_battlePanel:ClosePanel()
end
self:ClosePanel()
-- 再刷新一便关卡信息
NetManager.InitFightPointLevelInfo()
end
end, 1, true, true)
end)
else
-- 打开关卡奖励界面
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1,function()
if m_battlePanel then
m_battlePanel:ClosePanel()
end
self:ClosePanel()
end, 1, true)
end
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.EXECUTE_FIGHT then
self:ClosePanel()
local bestData, allDamage= BattleRecordManager.GetBattleBestData()
if bestData then
-- 胜利显示本场比赛的表现最好的英雄
local GetCurNodeInfo = ExpeditionManager.curAttackNodeInfo--ExpeditionManager.GetCurNodeInfo()
local func2 = nil
if GetCurNodeInfo.type == ExpeditionNodeType.Trail then--试炼节点
func2 = function()
Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshPlayAniMainPanel)
end
end
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup)
--贪婪节点不弹领取圣物
if GetCurNodeInfo.type == ExpeditionNodeType.Greed then--贪婪节点
local drop = BattleManager.GetLastBattleResult().drop
if m_battleResult.drop.itemlist and #drop.itemlist > 0 then
LogGreen("m_battleResult.drop.itemlist "..#m_battleResult.drop.itemlist)
else
LogGreen(Language[12202])
end
UIManager.OpenPanel(UIName.RewardItemPopup,m_battleResult.drop, 1,function(isBackBattle)
LogPink("isBackBattle "..tostring(isBackBattle))
if not isBackBattle then
if m_battlePanel then
m_battlePanel:ClosePanel()
end
if _BattleBestPopup then
_BattleBestPopup:ClosePanel()
end
Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshPlayAniMainPanel)
end
end, 0,true,true)
elseif GetCurNodeInfo.type == ExpeditionNodeType.Trail then--试炼节点
if m_battleResult.drop and m_battleResult.drop.soulEquip and #m_battleResult.drop.soulEquip > 0 then
for i = 1, #m_battleResult.drop.soulEquip do
ExpeditionManager.InitSingleTreasureData(m_battleResult.drop.soulEquip[i])
end
end
if m_battleResult.drop and m_battleResult.drop.Hero and m_battleResult.drop.Hero[1] then
ExpeditionManager.UpdateHeroDatas(m_battleResult.drop.Hero[1])
else
LogError(Language[11541])
end
if m_battlePanel then
m_battlePanel:ClosePanel()
end
PopupTipPanel.ShowTip(Language[12192])
else
UIManager.OpenPanel(UIName.RewardItemPopup,BattleManager.GetLastBattleResult().drop, 1,function(isBackBattle)
LogPink("isBackBattle "..tostring(isBackBattle))
if not isBackBattle then
if m_battlePanel then
m_battlePanel:ClosePanel()
end
if _BattleBestPopup then
_BattleBestPopup:ClosePanel()
end
if GetCurNodeInfo.holyEquipID and #GetCurNodeInfo.holyEquipID > 0 then
UIManager.OpenPanel(UIName.ExpeditionSelectHalidomPanel,true,function ()
end)
else
--此时战斗了但没有圣物 所有直接刷新界面动画 后并刷新界面
Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshPlayAniMainPanel)
end
end
end, 0,true,true)
end
end,func2)
end
end
end
end
end

View File

@ -19,6 +19,7 @@ local isOpenGeiSSRAvtivityTime
local isPlayerAniEnd = true
local itemDataList
local showHero = 1
local isBackBattle = false
--初始化组件(用于子类重写)
--此界面无奈做了两套显示逻辑一个是掉落小于等于25时背景根据元素数量做拉伸状态 另一个是元素大于25做界面做可滑动
function RewardItemPopup:InitComponent()
@ -112,6 +113,8 @@ function RewardItemPopup:BindEvent()
UIManager.OpenPanel(UIName.DamageResultPanel, 1)
end)
Util.AddClick(this.btnBattleBack, function ()
LogGreen("isBackBattle = true")
isBackBattle = true
BattleManager.BattleBackFun()
end)
end
@ -121,7 +124,8 @@ end
--func 回调
function RewardItemPopup:OnOpen(...)
LogGreen("isBackBattle = false")
isBackBattle = false
isPlayerAniEnd = true
isOpenGeiSSRAvtivity = 0
sortingOrderNum = self.sortingOrder
@ -141,7 +145,7 @@ function RewardItemPopup:OnOpen(...)
end
local haveRecord = BattleRecordManager.isHaveRecord()
this.btnResult:SetActive(haveRecord and args[5])
this.btnBattleBack:SetActive(false)--haveRecord and args[5])
this.btnBattleBack:SetActive(haveRecord and args[5])
this.btnResultMax:SetActive(haveRecord and args[5])
-- 设置背景遮罩的显隐
@ -504,7 +508,7 @@ function RewardItemPopup:OnClose()
if FightPointPassManager.oldLevel<PlayerManager.level then
if fightConFigData and fightConFigData.PicShow == 1 and FightPointPassManager.isOpenNewChapter then
UIManager.OpenPanel(UIName.FightEndLvUpPanel,FightPointPassManager.oldLevel,PlayerManager.level,function ()
func()
func(isBackBattle)
end)
else
UIManager.OpenPanel(UIName.FightEndLvUpPanel,FightPointPassManager.oldLevel,PlayerManager.level,func)
@ -516,9 +520,9 @@ function RewardItemPopup:OnClose()
compShowType = 0
if func and not isPopGetSSR then
if fightConFigData and fightConFigData.PicShow == 1 and FightPointPassManager.isOpenNewChapter then
func()
func(isBackBattle)
else
func()
func(isBackBattle)
end
end