示例#1
0
 /// <summary>
 /// This sends a RPC to all players or if called clientside sends to the server.
 /// </summary>
 public static void Send <TClass>(string methodName, TClass T) where TClass : class, new()
 {
     Net.Start("voidsharp_" + methodName);
     WriteData(T);
     if (Realm.IsClient())
     {
         Net.SendToServer();
     }
     else
     {
         Net.Broadcast();
     }
 }