Exemple #1
0
        static public void WriteInstance(NetworkWriter writer, SyncListInt items)
        {
            writer.Write((ushort)items.Count);

            for (int i = 0; i < items.Count; i++)
            {
                writer.WritePackedUInt32((uint)items[i]);
            }
        }
Exemple #2
0
        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());
            }
        }
Exemple #3
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);
        }