Beispiel #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");
     }
 }
Beispiel #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");
     }
 }