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