Exemplo n.º 1
0
        public static SyncListBool ReadInstance(NetworkReader reader)
        {
            ushort       num   = reader.ReadUInt16();
            SyncListBool @bool = new SyncListBool();

            for (ushort i = 0; i < num; i = (ushort)(i + 1))
            {
                @bool.AddInternal(reader.ReadBoolean());
            }
            return(@bool);
        }
Exemplo n.º 2
0
        static public SyncListBool ReadInstance(NetworkReader reader)
        {
            ushort count  = reader.ReadUInt16();
            var    result = new SyncListBool();

            for (ushort i = 0; i < count; i++)
            {
                result.AddInternal(reader.ReadBoolean());
            }
            return(result);
        }
Exemplo n.º 3
0
        public static void WriteInstance(NetworkWriter writer, SyncListBool items)
        {
            writer.Write((ushort)items.Count);
            IEnumerator <bool> enumerator = items.GetEnumerator();

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