2025-01-04 23:00:19 +08:00

48 lines
1.3 KiB
Lua

---@class WB_FightPanel_C:UAEUserWidget
---@field Button_ShowGuide UButton
---@field NewButton_GM UNewButton
---@field REINST_WB_AttackPoint_C_0 UWB_AttackPoint_C
---@field W_TeamScore_RoundMode UW_TeamScore_RoundMode_C
---@field WB_AttackPoint UWB_AttackPoint_C
---@field WB_HP UWB_HP_C
--Edit Below--
---@type WB_FightPanel_C
local WB_FightPanel = { bInitDoOnce = false; };
function WB_FightPanel:Construct()
self:LuaInit();
end
function WB_FightPanel:LuaInit()
if self.bInitDoOnce then return end
self.bInitDoOnce = true
UGCEventSystem.AddListener(EventEnum.UpdateMapMode, self.UpdateMapMode, self)
self:UpdateMapMode(UGCGameSystem.GameState:GetMapModeType())
WidgetLibrary.ButtonOnClickShowPanel(self.Button_ShowGuide, WidgetConfig.EUIType.Guide);
if GlobalConfigs.IsDebug then
self.NewButton_GM:SetVisibility(ESlateVisibility.Visible)
WidgetLibrary.ButtonOnClickShowPanel(self.NewButton_GM, WidgetConfig.EUIType.Debug)
end
end
function WB_FightPanel:OnShowPanel()
self.W_TeamScore_RoundMode:OnShowPanel()
end
function WB_FightPanel:OnClosePanel()
self.W_TeamScore_RoundMode:OnClosePanel()
end
function WB_FightPanel:UpdateMapMode(InMapModeType)
if InMapModeType == MapConfig.EModeType.AttackPoint then
self.WB_AttackPoint:SetVisibility(ESlateVisibility.SelfHitTestInvisible)
self.WB_AttackPoint:Active()
end
end
return WB_FightPanel;