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);
    }
Exemple #2
0
    void OnBarPosMessage(NetworkMessage msg)
    {
        BarPos bar = msg.ReadMessage <BarPos>();

        RpcSetOppBarPosition(bar.id, bar.px, bar.time);
    }