Reset() публичный Метод

public Reset ( ) : void
Результат void
Пример #1
0
        private ChannelPacket AllocPacket()
        {
            if (s_FreePackets.Count == 0)
            {
                return(new ChannelPacket(m_MaxPacketSize, m_IsReliable));
            }
            ChannelPacket result = s_FreePackets[s_FreePackets.Count - 1];

            s_FreePackets.RemoveAt(s_FreePackets.Count - 1);
            result.Reset();
            return(result);
        }
Пример #2
0
        private ChannelPacket AllocPacket()
        {
            if (ChannelBuffer.s_FreePackets.Count == 0)
            {
                return(new ChannelPacket(this.m_MaxPacketSize, this.m_IsReliable));
            }
            ChannelPacket result = ChannelBuffer.s_FreePackets[0];

            ChannelBuffer.s_FreePackets.RemoveAt(0);
            result.Reset();
            return(result);
        }
Пример #3
0
        private ChannelPacket AllocPacket()
        {
            NetworkDetailStats.SetStat(NetworkDetailStats.NetworkDirection.Outgoing, (short)31, "msg", ChannelBuffer.pendingPacketCount);
            if (ChannelBuffer.s_FreePackets.Count == 0)
            {
                return(new ChannelPacket(this.m_MaxPacketSize, this.m_IsReliable));
            }
            ChannelPacket freePacket = ChannelBuffer.s_FreePackets[ChannelBuffer.s_FreePackets.Count - 1];

            ChannelBuffer.s_FreePackets.RemoveAt(ChannelBuffer.s_FreePackets.Count - 1);
            freePacket.Reset();
            return(freePacket);
        }
Пример #4
0
        private ChannelPacket AllocPacket()
        {
            NetworkDetailStats.SetStat(NetworkDetailStats.NetworkDirection.Outgoing, 0x1f, "msg", pendingPacketCount);
            if (s_FreePackets.Count == 0)
            {
                return(new ChannelPacket(this.m_MaxPacketSize, this.m_IsReliable));
            }
            ChannelPacket packet = s_FreePackets[0];

            s_FreePackets.RemoveAt(0);
            packet.Reset();
            return(packet);
        }
Пример #5
0
        private ChannelPacket AllocPacket()
        {
            ChannelPacket result;

            if (ChannelBuffer.s_FreePackets.Count == 0)
            {
                result = new ChannelPacket(this.m_MaxPacketSize, this.m_IsReliable);
            }
            else
            {
                ChannelPacket channelPacket = ChannelBuffer.s_FreePackets[ChannelBuffer.s_FreePackets.Count - 1];
                ChannelBuffer.s_FreePackets.RemoveAt(ChannelBuffer.s_FreePackets.Count - 1);
                channelPacket.Reset();
                result = channelPacket;
            }
            return(result);
        }