UGCProjects/ProjectTemp_T/Script/gamemode/Action_ShowHitUIAnimation.lua
2025-01-04 23:00:19 +08:00

31 lines
968 B
Lua
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

local Action_ShowHitUIAnimation = {
-- 可配置参数定义参数将显示在Action配置面板
-- 例:
-- MyIntParameter = 0
CauserKey = "";
VictimKey = "";
}
-- 触发器激活时将执行Action的Execute
function Action_ShowHitUIAnimation:Execute(...)
self.VictimKey = tonumber(self.VictimKey)
self.CauserKey = tonumber(self.CauserKey)
local VictimPawn = UGCGameSystem.GetPlayerPawnByPlayerKey(self.VictimKey)
local IsKill = true
if UE.IsValid(VictimPawn) then
IsKill = (UGCPawnAttrSystem.GetHealth(VictimPawn) < 0.01)
end
UGCSendRPCSystem.ClientShowUI(self.CauserKey, WidgetConfig.EUIType.DamageAnim, false, IsKill)
return true
end
--[[
-- 需要勾选Action的EnableTick才会执行Update
-- 触发器激活后将在每个tick执行Action的Update直到self.bEnableActionTick为false
function Action_ShowHitUIAnimation:Update(DeltaSeconds)
end
]]
return Action_ShowHitUIAnimation