Advertisement
Guest User

Untitled

a guest
Apr 25th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. public struct NetworkEntity
  2. {
  3. public static NetworkEntity InvalidEntity = new NetworkEntity();
  4.  
  5. public int NetId { get; private set; }
  6. public int LocalId => API.NetworkGetEntityFromNetworkId(NetId); // call this every time I need to work on the entity
  7. public bool Exists => NetId != 0;
  8.  
  9. public NetworkEntity(int netID)
  10. {
  11. if (netID == 0)
  12. {
  13. throw new ArgumentException("netID == 0");
  14. }
  15.  
  16. NetId = netID;
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement