public static void SendBarPos(float px, float time) { if (client == null) { return; } BarPos msg = new BarPos(); msg.id = connId; msg.px = px; msg.time = time; client.Send(PongMsgType.BarPos, msg); }
void OnBarPosMessage(NetworkMessage msg) { BarPos bar = msg.ReadMessage <BarPos>(); RpcSetOppBarPosition(bar.id, bar.px, bar.time); }