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); }
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); }
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(); } }