2025-01-04 23:00:19 +08:00

36 lines
711 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.

--- 属性同步RPC 抽出来
local RepProp = {};
---@type table 所有者
RepProp.Owner = nil;
--- @type AActor 属性同步用的 Actor
RepProp.RepOwner = nil;
--- 需要同步的属性
RepProp.Info = {};
--- 缓存的上一帧的属性
RepProp.CachedInfo = {};
function RepProp:Init(InOwner, InRepOwner)
assert(InOwner ~= nil, "Owner 必须不能为空");
assert(InRepOwner ~= nil, "RepOwner 必须不能为空");
self.Owner = InOwner;
self.RepOwner = InRepOwner;
end
--- 仅在客户端存在
if not UE_SERVER then
function RepProp:OnRep_Info(InOld)
end
end
function RepProp:DOREPONCE(Name)
--self.Info[Name] =
end
function RepProp:SetInfo(Key, Value)
end
return RepProp;