/// <summary> /// Create an instance NetRef /// </summary> /// <param name="getter">The getter function for the variable</param> /// <param name="setter">The setter function for the variable</param> /// <param name="callback">The optional callback to be executed when the replication has complete</param> /// <param name="callbackCallers">The group of callers that will execute the callback method</param> public NetRef(Func<T> getter, Action<T> setter, Action callback, NetworkCallers callbackCallers, bool ignoreInterpolation = false, bool serverOnly = false) { this.getter = getter; this.setter = setter; this.callback = callback; this.IgnoreLerp = ignoreInterpolation; this.callbackCallers = callbackCallers; this.serverOnly = serverOnly; this.IsNumber = BeardedMath.IsNumber(getter()); if (!this.IsNumber && !this.IgnoreLerp) this.IgnoreLerp = true; PreviousValue = getter(); }
public NetSync(string method, NetworkCallers callers, Interpolate ignoreInterpolation) { this.method = method; this.callers = callers; interpolate = ignoreInterpolation; }
public NetSync(string method, NetworkCallers callers) { this.method = method; this.callers = callers; interpolate = Interpolate.True; }
public NetSync() { method = string.Empty; callers = NetworkCallers.Everyone; interpolate = Interpolate.True; }
public NetSync() { this.method = string.Empty; this.callers = NetworkCallers.Everyone; this.interpolate = Interpolate.True; }
public NetSync(string method, NetworkCallers callers) { this.method = method; this.callers = callers; }
public NetSync() { this.method = string.Empty; this.callers = NetworkCallers.Everyone; }