Exemple #1
0
        public static SyncListUInt ReadInstance(NetworkReader reader)
        {
            ushort       num          = reader.ReadUInt16();
            SyncListUInt syncListUInt = new SyncListUInt();

            for (ushort num2 = 0; num2 < num; num2 = (ushort)(num2 + 1))
            {
                syncListUInt.AddInternal(reader.ReadPackedUInt32());
            }
            return(syncListUInt);
        }
        static public SyncListUInt ReadInstance(NetworkReader reader)
        {
            ushort count  = reader.ReadUInt16();
            var    result = new SyncListUInt();

            for (ushort i = 0; i < count; i++)
            {
                result.AddInternal(reader.ReadPackedUInt32());
            }
            return(result);
        }
        public static SyncListUInt ReadInstance(NetworkReader reader)
        {
            ushort       num  = reader.ReadUInt16();
            SyncListUInt num2 = new SyncListUInt();

            for (ushort i = 0; i < num; i = (ushort)(i + 1))
            {
                num2.AddInternal(reader.ReadPackedUInt32());
            }
            return(num2);
        }
        public static SyncListUInt ReadInstance(NetworkReader reader)
        {
            ushort       num          = reader.ReadUInt16();
            SyncListUInt syncListUint = new SyncListUInt();

            for (ushort index = 0; (int)index < (int)num; ++index)
            {
                syncListUint.AddInternal(reader.ReadPackedUInt32());
            }
            return(syncListUint);
        }
Exemple #5
0
        public static void WriteInstance(NetworkWriter writer, SyncListUInt items)
        {
            writer.Write((ushort)items.Count);
            IEnumerator <uint> enumerator = items.GetEnumerator();

            try
            {
                while (enumerator.MoveNext())
                {
                    uint current = enumerator.Current;
                    writer.WritePackedUInt32(current);
                }
            }
            finally
            {
                if (enumerator == null)
                {
                }
                enumerator.Dispose();
            }
        }