33 lines
1.0 KiB
Lua
33 lines
1.0 KiB
Lua
local Buff_PlayerAddJump = {};
|
|
|
|
function Buff_PlayerAddJump:LuaDoAction()
|
|
if not UGCGameSystem.IsServer() then return true end
|
|
UGCLogSystem.Log("[Buff_PlayerAddJump_LuaDoAction]")
|
|
local OwnerPawn = self:GetOwnerPawn()
|
|
if UE.IsValid(OwnerPawn) and self.Params[1] then
|
|
UGCPawnAttrSystem.SetJumpZVelocity(OwnerPawn, UGCPawnAttrSystem.GetJumpZVelocity(OwnerPawn) * self.Params[1])
|
|
end
|
|
return true
|
|
end
|
|
|
|
function Buff_PlayerAddJump:LuaUndoAction()
|
|
if not UGCGameSystem.IsServer() then return true end
|
|
UGCLogSystem.Log("[Buff_PlayerAddJump_LuaUndoAction]")
|
|
local OwnerPawn = self:GetOwnerPawn()
|
|
if UE.IsValid(OwnerPawn) and self.Params[1] then
|
|
UGCPawnAttrSystem.SetJumpZVelocity(OwnerPawn, UGCPawnAttrSystem.GetJumpZVelocity(OwnerPawn) / self.Params[1])
|
|
end
|
|
return true
|
|
end
|
|
|
|
function Buff_PlayerAddJump:LuaResetAction()
|
|
UGCLogSystem.Log("[Buff_PlayerAddJump_LuaResetAction]")
|
|
return true
|
|
end
|
|
|
|
--function Buff_PlayerAddJump:LuaUpdateAction(DeltaSeconds)
|
|
-- return true
|
|
--end
|
|
|
|
|
|
return Buff_PlayerAddJump; |