Ejemplo n.º 1
0
 /// <summary>
 /// Sends a message to the counterpart component on the server side
 /// </summary>
 /// <param name="component">Sending component</param>
 /// <param name="method">Net Delivery Method</param>
 /// <param name="messageParams">Parameters</param>
 public void SendComponentNetworkMessage(IComponent component, NetDeliveryMethod method,
                                         params object[] messageParams)
 {
     if (component.NetID == null)
     {
         throw new ArgumentException("Component has no Net ID and cannot be used across the network.");
     }
     EntityNetworkManager.SendComponentNetworkMessage(this, component.NetID.Value, NetDeliveryMethod.ReliableUnordered,
                                                      messageParams);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Sends a message to the counterpart component on the server side
 /// </summary>
 /// <param name="component">Sending component</param>
 /// <param name="method">Net Delivery Method</param>
 /// <param name="messageParams">Parameters</param>
 public void SendComponentNetworkMessage(Component component, NetDeliveryMethod method,
                                         params object[] messageParams)
 {
     EntityNetworkManager.SendComponentNetworkMessage(this, component.Family, NetDeliveryMethod.ReliableUnordered,
                                                      messageParams);
 }