58 lines
1.8 KiB
Lua
Raw Permalink Normal View History

2025-01-04 23:00:19 +08:00
---@class WB_FightPanel_C:UAEUserWidget
---@field Button_ShowGuide UButton
---@field NewButton_GM UNewButton
---@field W_TeamScore_RoundMode UW_TeamScore_RoundMode_C
---@field W_TeamScore_RoundMode_2 UW_TeamScore_RoundMode_2_C
---@field WB_AttackPoint UWB_AttackPoint_C
---@field WB_BondSystemTip UWB_BondSystemTip_C
---@field WB_HP UWB_HP_C
---@field WidgetSwitcher_0 UWidgetSwitcher
--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
self.WB_BondSystemTip:Active()
end
function WB_FightPanel:OnShowPanel()
self.W_TeamScore_RoundMode_2:OnShowPanel()
--self.W_TeamScore_RoundMode:OnShowPanel()
end
function WB_FightPanel:OnClosePanel()
self.W_TeamScore_RoundMode_2:OnClosePanel()
--self.W_TeamScore_RoundMode:OnClosePanel()
end
function WB_FightPanel:UpdateMapMode(InMapModeType)
UGCLogSystem.Log("[WB_FightPanel_UpdateMapMode] InMapModeType:%s", tostring(InMapModeType))
if InMapModeType == MapConfig.EModeType.AttackPoint then
self.WB_AttackPoint:SetVisibility(ESlateVisibility.SelfHitTestInvisible)
self.WB_AttackPoint:Active()
UGCLogSystem.Log("[WB_FightPanel_UpdateMapMode] Active")
else
self.WB_AttackPoint:SetVisibility(ESlateVisibility.Collapsed)
end
end
return WB_FightPanel;