baflink

Forge-RemoteProcedureCall.cs

Jul 7th, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.33 KB | None | 0 0
  1. using UnityEngine;
  2.  
  3. using BeardedManStudios.Network;
  4.  
  5. public class MoveBallUp : SimpleNetworkedMonoBehavior
  6. {
  7.     [BRPC]
  8.     private void MoveBall(Vector3 moveBy)
  9.     {
  10.         transform.position += moveBy;
  11.     }
  12.  
  13.     private void Update()
  14.     {
  15.         if (Input.GetKeyDown(KeyCode.Space))
  16.             RPC("MoveBall", new Vector3(0.35f, 1.2f, -2.32f));
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment