Example #1
0
 public static void WriteInstance(NetworkWriter writer, SyncListInt items)
 {
     writer.Write((ushort)items.Count);
     foreach (var item in items)
     {
         writer.WritePackedUInt32((uint)item);
     }
 }
Example #2
0
        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());
            }
        }
Example #3
0
        public static SyncListInt ReadInstance(NetworkReader reader)
        {
            var num         = reader.ReadUInt16();
            var syncListInt = new SyncListInt();

            for (ushort index = 0; (int)index < (int)num; ++index)
            {
                syncListInt.AddInternal((int)reader.ReadPackedUInt32());
            }
            return(syncListInt);
        }