static public void WriteInstance(NetworkWriter writer, SyncListInt items)
 {
     writer.Write((ushort)items.Count);
     foreach (var item in items)
     {
         writer.WritePackedUInt32((uint)item);
     }
 }
示例#2
0
 public static void WriteInstance(NetworkWriter writer, SyncListInt items)
 {
     writer.Write((ushort)items.Count);
     for (int i = 0; i < items.Count; i++)
     {
         writer.WritePackedUInt32((uint)items[i]);
     }
 }
示例#3
0
 public static void WriteInstance(NetworkWriter writer, SyncListInt items)
 {
     writer.Write((ushort)items.Count);
     foreach (int num in (SyncList <int>)items)
     {
         writer.WritePackedUInt32((uint)num);
     }
 }
示例#4
0
        /// <summary>
        /// An internal function used for serializing SyncList member variables.
        /// </summary>
        /// <param name="reader"></param>
        /// <param name="syncList"></param>
        static public void ReadReference(NetworkReader reader, SyncListInt syncList)
        {
            ushort count = reader.ReadUInt16();

            syncList.Clear();
            for (ushort i = 0; i < count; i++)
            {
                syncList.AddInternal((int)reader.ReadPackedUInt32());
            }
        }
示例#5
0
        public static void ReadReference(NetworkReader reader, SyncListInt syncList)
        {
            ushort num = reader.ReadUInt16();

            syncList.Clear();
            for (ushort num2 = 0; num2 < num; num2 = (ushort)(num2 + 1))
            {
                syncList.AddInternal((int)reader.ReadPackedUInt32());
            }
        }
示例#6
0
        /// <summary>
        ///   <para>An internal function used for serializing SyncList member variables.</para>
        /// </summary>
        /// <param name="reader"></param>
        /// <param name="syncList"></param>
        public static void ReadReference(NetworkReader reader, SyncListInt syncList)
        {
            ushort num = reader.ReadUInt16();

            syncList.Clear();
            for (ushort index = 0; (int)index < (int)num; ++index)
            {
                syncList.AddInternal((int)reader.ReadPackedUInt32());
            }
        }
示例#7
0
        static public SyncListInt ReadInstance(NetworkReader reader)
        {
            ushort count  = reader.ReadUInt16();
            var    result = new SyncListInt();

            for (ushort i = 0; i < count; i++)
            {
                result.AddInternal((int)reader.ReadPackedUInt32());
            }
            return(result);
        }
示例#8
0
        public static SyncListInt ReadInstance(NetworkReader reader)
        {
            ushort      num  = reader.ReadUInt16();
            SyncListInt num2 = new SyncListInt();

            for (ushort i = 0; i < num; i = (ushort)(i + 1))
            {
                num2.AddInternal((int)reader.ReadPackedUInt32());
            }
            return(num2);
        }
示例#9
0
        public static SyncListInt ReadInstance(NetworkReader reader)
        {
            ushort      num         = reader.ReadUInt16();
            SyncListInt syncListInt = new SyncListInt();

            for (ushort num2 = 0; num2 < num; num2 = (ushort)(num2 + 1))
            {
                syncListInt.AddInternal((int)reader.ReadPackedUInt32());
            }
            return(syncListInt);
        }
示例#10
0
        public static SyncListInt ReadInstance(NetworkReader reader)
        {
            ushort      num         = reader.ReadUInt16();
            SyncListInt syncListInt = new SyncListInt();

            for (ushort index = 0; (int)index < (int)num; ++index)
            {
                syncListInt.AddInternal((int)reader.ReadPackedUInt32());
            }
            return(syncListInt);
        }
示例#11
0
        public static void WriteInstance(NetworkWriter writer, SyncListInt items)
        {
            writer.Write((ushort)items.Count);
            IEnumerator <int> enumerator = items.GetEnumerator();

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