Exemplo n.º 1
0
 public void Broadcast(Frame f, NetEntity to)
 {
     if (to.Owner == id)
     {
         BroadcastEntityMessageFrame broadcastEntityMessage = new BroadcastEntityMessageFrame(f.Type, to.ID);
         broadcastEntityMessage.AddFrame(f);
         sendQueue.Enqueue(broadcastEntityMessage);
     }
     else
     {
         OnError?.Invoke("Entity must be owned to send data");
     }
 }
Exemplo n.º 2
0
 public void Send(Frame f, NetEntity to)
 {
     if (to.Owner == id)
     {
         RelayEntityMessageFrame relayEntityMessage = new RelayEntityMessageFrame(f.Type, to.ID);
         relayEntityMessage.AddFrame(f);
         sendQueue.Enqueue(relayEntityMessage);
     }
     else
     {
         OnError?.Invoke("Entity must be owned to send data");
     }
 }