Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace BeardedManStudios.Forge.Examples
- {
- public class URPC_Message_Delay_30 : NetworkedMonoBehavior
- {
- private float interval = 0.0f;
- private void Update()
- {
- if (OwningNetWorker.IsServer)
- {
- interval += Time.deltaTime;
- if (interval > 0.1f)
- {
- URPC("UpdateTime", NetworkReceivers.Others, NetworkingManager.Instance.ServerTime);
- Debug.Log("UpdateTime: " + NetworkingManager.Instance.SimulatedServerTime);
- interval = 0.0f;
- }
- }
- }
- [BRPC]
- private void UpdateTime(float time)
- {
- Debug.Log("UpdateTime: " + time);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement