コード例 #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);
        }
コード例 #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);
        }
コード例 #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();
            }
        }