Exemplo n.º 1
0
    void RpcReceiveData(byte[] encodedData)
    {
        if (isLocalPlayer && !playLocally)
        {
            Debug.Log("OpusNetworked.RpcReceiveData: discard! " + encodedData.Length);
            return;
        }

        Debug.Log("OpusNetworked.RpcReceiveData: add to buffer " + encodedData.Length);
        // the data would need to be sent over the network, we just decode it now to test the result
        receiveBuffer.AddRange(decoder.DecodePacketFloat(encodedData));
    }
Exemplo n.º 2
0
 void ReceiveEncodedData(byte[] encodedData)
 {
     receiveBuffer.AddRange(decoder.DecodePacketFloat(encodedData));
 }
Exemplo n.º 3
0
 public float[] DecodeToFloat(byte[] buf)
 {
     return(decoder.DecodePacketFloat(buf));
 }
 public float[] DecodeToFloat(byte[] buf)
 {
     return(Error == null?decoder.DecodePacketFloat(buf) : EmptyBufferFloat);
 }