32 lines
1.2 KiB
Lua
32 lines
1.2 KiB
Lua
|
local Action_KillReward = {
|
|||
|
-- 可配置参数定义,参数将显示在Action配置面板
|
|||
|
-- 例:
|
|||
|
-- MyIntParameter = 0
|
|||
|
KillerPlayerKey = -1;
|
|||
|
AddHealth = 30.;
|
|||
|
}
|
|||
|
|
|||
|
-- 触发器激活时,将执行Action的Execute
|
|||
|
function Action_KillReward:Execute(...)
|
|||
|
self.KillerPlayerKey = tonumber(self.KillerPlayerKey)
|
|||
|
|
|||
|
local KillerPawn = UGCGameSystem.GetPlayerPawnByPlayerKey(self.KillerPlayerKey)
|
|||
|
if UE.IsValid(KillerPawn) then
|
|||
|
UGCLogSystem.Log("[Action_KillReward_Execute]:%s", tostring(UE.IsValid(BP_BuffManager.GetBuffManager())))
|
|||
|
--BP_BuffManager.GetBuffManager():CreateBuff(self.KillerPlayerKey, true, Tables.ParticlePath.AddHealth, BP_BuffManager.BuffList.AddPlayerPawnHealth, self.AddHealth)
|
|||
|
--BP_BuffManager.GetBuffManager():CreateBuff(self.KillerPlayerKey, true, nil, BP_BuffManager.BuffList.FillUpWithBullets)
|
|||
|
UGCLogSystem.Log("[Action_KillReward_Execute] end")
|
|||
|
|
|||
|
end
|
|||
|
return true
|
|||
|
end
|
|||
|
|
|||
|
--[[
|
|||
|
-- 需要勾选Action的EnableTick,才会执行Update
|
|||
|
-- 触发器激活后,将在每个tick执行Action的Update,直到self.bEnableActionTick为false
|
|||
|
function Action_KillReward:Update(DeltaSeconds)
|
|||
|
|
|||
|
end
|
|||
|
]]
|
|||
|
|
|||
|
return Action_KillReward
|