private void broadcastUpdate(GameUpdate update) { foreach (ConnectedPlayer p in players) { try { protocol.sendGameUpdate(master.getMatchingPlayer(p.color).client.peerID, update); } catch { Debug.LogError("Error sending broadcast"); } } }
public void sendGameUpdate(int targetID, GameUpdate board) { sendMsg(board, targetID, (short)MsgType.gameUpdate); }