Exemple #1
0
 public void SendClientNotReady()
 {
     if (!IsNetworkActive)
     {
         return;
     }
     Transport.ClientSendPacket(MessageId.ClientNotReady);
 }
Exemple #2
0
 public void SendClientEnterGame()
 {
     if (!IsNetworkActive)
     {
         return;
     }
     Transport.ClientSendPacket(MessageId.ClientEnterGame);
 }
Exemple #3
0
 public void SendClientReady(string userId)
 {
     if (!IsNetworkActive)
     {
         return;
     }
     Transport.ClientSendPacket(MessageId.ClientReady, new StringMessage {
         value = userId
     });
 }
Exemple #4
0
 public void Send <T>(byte messageId, T message) where T : INetSerializable
 {
     if (!IsServer)
     {
         Transport.ClientSendPacket(messageId, messageData: message);
     }
     else
     {
         Transport.ServerSendPacketToAll(messageId, messageData: message);
     }
 }
Exemple #5
0
 public void Send(byte messageId)
 {
     if (!IsServer)
     {
         Transport.ClientSendPacket(messageId);
     }
     else
     {
         Transport.ServerSendPacketToAll(messageId);
     }
 }