Ejemplo n.º 1
0
    public Snapshot ReadSnapshot(NetDataReader reader, out int ackedTick)
    {
        lastReceivedPacketTime = DateTimeOffset.Now.ToUnixTimeMilliseconds();

        var snapshot = compressionManager.DecodeSnapshot(reader.GetRemainingBytes(), out ackedTick);

        if (LastAckedSnapshot < snapshot.Tick)
        {
            LastAckedSnapshot = snapshot.Tick;
        }

        return(snapshot);
    }