71 lines
2.3 KiB
Lua
71 lines
2.3 KiB
Lua
|
---@class WB_MarkEnemy_C:ObjectPositionWidget
|
||
|
---@field CanvasPanel_Child UCanvasPanel
|
||
|
--Edit Below--
|
||
|
local WB_MarkEnemy = { bInitDoOnce = false; };
|
||
|
|
||
|
--[==[ Construct
|
||
|
function WB_MarkGodOfWar:Construct()
|
||
|
|
||
|
end
|
||
|
-- Construct ]==]
|
||
|
|
||
|
-- function WB_MarkGodOfWar:Tick(MyGeometry, InDeltaTime)
|
||
|
|
||
|
-- end
|
||
|
|
||
|
-- function WB_MarkGodOfWar:Destruct()
|
||
|
|
||
|
-- end
|
||
|
|
||
|
function WB_MarkEnemy:Tick(MyGeometry, InDeltaTime)
|
||
|
--UGCLogSystem.Log("[WB_HuntingMarkEnemy_Tick]")
|
||
|
--local IsTrace = false
|
||
|
--if self.TracePlayerKey then
|
||
|
-- --UGCLogSystem.Log("[WB_HuntingMarkEnemy_Tick]22222222222222222222222222222222222222222222222222222222")
|
||
|
--
|
||
|
-- local Pawn = UGCGameSystem.GetPlayerPawnByPlayerKey(self.TracePlayerKey)
|
||
|
-- --UGCLogSystem.Log("[WB_HuntingMarkEnemy_Tick] 1")
|
||
|
-- if Pawn and not UGCPawnSystem.HasPawnState(Pawn, EPawnState.Dead) then
|
||
|
-- --UGCLogSystem.Log("[WB_HuntingMarkEnemy_Tick] 2")
|
||
|
-- local PlayerPos
|
||
|
-- if UE.IsValid(Pawn.Mesh) then
|
||
|
-- PlayerPos = Pawn.Mesh:GetSocketLocation("spine_03")
|
||
|
-- else
|
||
|
-- PlayerPos = Pawn:K2_GetActorLocation()
|
||
|
-- PlayerPos.Z = PlayerPos.Z + 30
|
||
|
-- end
|
||
|
--
|
||
|
-- local Succeed, Pos2D = WidgetLayoutLibrary.ProjectWorldLocationToWidgetPosition(UGCSystemLibrary.GetLocalPlayerController(), PlayerPos)
|
||
|
-- if Succeed then
|
||
|
-- --UGCLogSystem.Log("[WB_HuntingMarkEnemy_Tick] 3 Pos2D:%s", VectorHelper.ToString2D(Pos2D))
|
||
|
-- IsTrace = true
|
||
|
-- local CanvasSlot = WidgetLayoutLibrary.SlotAsCanvasSlot(self.CanvasPanel_Child)
|
||
|
-- CanvasSlot:SetPosition(Pos2D)
|
||
|
-- end
|
||
|
-- end
|
||
|
--
|
||
|
--end
|
||
|
--self:SetTraceUIVis(IsTrace)
|
||
|
end
|
||
|
|
||
|
-- function WB_HuntingMarkEnemy:Destruct()
|
||
|
|
||
|
-- end
|
||
|
|
||
|
function WB_MarkEnemy:SetTracePlayerKey(InPlayerKey)
|
||
|
UGCLogSystem.Log("[WB_HuntingMarkEnemy_SetTracePlayerKey] InPlayerKey:%s", tostring(InPlayerKey))
|
||
|
self.TracePlayerKey = InPlayerKey
|
||
|
end
|
||
|
|
||
|
function WB_MarkEnemy:SetTraceUIVis(InIsVis)
|
||
|
if self.IsVis ~= InIsVis then
|
||
|
self.IsVis = InIsVis
|
||
|
if self.IsVis then
|
||
|
self.CanvasPanel_Child:SetVisibility(ESlateVisibility.HitTestInvisible);
|
||
|
else
|
||
|
self.CanvasPanel_Child:SetVisibility(ESlateVisibility.Collapsed);
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
|
||
|
return WB_MarkEnemy;
|