Files
SL1900 35c8d87e86 Update - 1.4.0.73
EN: 1.4.0.73
CN: 1.4.0.74
JP: 1.4.0.77
KR: 1.4.0.80
2025-12-25 19:00:00 +09:00

73 lines
2.3 KiB
Lua

local TDBattlePanel = class("TDBattlePanel", BasePanel)
local GamepadUIManager = require("GameCore.Module.GamepadUIManager")
TDBattlePanel.OpenMinMap = true
TDBattlePanel._bAddToBackHistory = false
TDBattlePanel._tbDefine = {
{
sPrefabPath = "RoguelikeItemTip/RoguelikeItemTipPanel.prefab",
sCtrlName = "Game.UI.RoguelikeItemTips.RoguelikeItemTipsCtrl"
},
{
sPrefabPath = "Battle/BattleDashboard.prefab",
sCtrlName = "Game.UI.Battle.BattleDashboardCtrl"
},
{
sPrefabPath = "Battle/MainBattleMenu.prefab",
sCtrlName = "Game.UI.Battle.MainBattleMenuCtrl"
},
{
sPrefabPath = "Battle/AdventureMainUI/AdventureMainUI.prefab",
sCtrlName = "Game.UI.Battle.MainBattleCtrl"
},
{
sPrefabPath = "Battle/AdventureMainUI/BattlePopupTips.prefab",
sCtrlName = "Game.UI.Battle.BattlePopupTipsCtrl"
},
{
sPrefabPath = "TDRoomInfo/TDRoomInfo.prefab",
sCtrlName = "Game.UI.TravelerDuelRoomInfo.TDRoomInfoCtrl"
},
{
sPrefabPath = "Battle/SkillHintIndicators.prefab",
sCtrlName = "Game.UI.Battle.SkillHintIndicator.HintIndicators"
},
{
sPrefabPath = "Battle/CommonBattlePausePanel.prefab",
sCtrlName = "Game.UI.TravelerDuelRoomInfo.TDPauseCtrl"
},
{
sPrefabPath = "Battle/SubSkillDisplay.prefab",
sCtrlName = "Game.UI.Battle.SubSkillDisplay.SubSkillDisplayCtrl"
}
}
function TDBattlePanel:Awake()
GamepadUIManager.EnterAdventure()
GamepadUIManager.EnableGamepadUI("BattleMenu", {})
self.BattleType = GameEnum.worldLevelType.TravelerDuel
end
function TDBattlePanel:OnEnable()
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForEndOfFrame())
local mapLevel = ConfigTable.GetData("TravelerDuelBossLevel", self._tbParam[2])
if mapLevel then
local FloorId = mapLevel.FloorId
local floorData = ConfigTable.GetData("TravelerDuelFloor", FloorId)
if floorData and floorData.IntroCutscene ~= "" then
EventManager.Hit(EventId.BattleDashboardVisible, false)
end
end
EventManager.Hit(EventId.OpenPanel, PanelId.Hud)
EventManager.Hit(EventId.ClosePanel, PanelId.MainlineFormation)
EventManager.Hit(EventId.ClosePanel, PanelId.RegionBossFormation)
end
cs_coroutine.start(wait)
end
function TDBattlePanel:OnAfterEnter()
EventManager.Hit(EventId.SubSkillDisplayInit, self._tbParam[1])
end
function TDBattlePanel:OnDisable()
GamepadUIManager.DisableGamepadUI("BattleMenu")
GamepadUIManager.QuitAdventure()
end
return TDBattlePanel