mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
syntax
This commit is contained in:
parent
7b4e174d23
commit
c994bb41b7
@ -281,18 +281,6 @@ public static void WriteList<T>(this NetworkWriter writer, List<T> list)
|
|||||||
writer.Write(list[i]);
|
writer.Write(list[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void WriteArray<T>(this NetworkWriter writer, T[] array)
|
|
||||||
{
|
|
||||||
if (array is null)
|
|
||||||
{
|
|
||||||
writer.WriteInt(-1);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
writer.WriteInt(array.Length);
|
|
||||||
for (int i = 0; i < array.Length; i++)
|
|
||||||
writer.Write(array[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void WriteHashSet<T>(this NetworkWriter writer, HashSet<T> hashSet)
|
public static void WriteHashSet<T>(this NetworkWriter writer, HashSet<T> hashSet)
|
||||||
{
|
{
|
||||||
if (hashSet is null)
|
if (hashSet is null)
|
||||||
@ -305,6 +293,17 @@ public static void WriteHashSet<T>(this NetworkWriter writer, HashSet<T> hashSet
|
|||||||
writer.Write(item);
|
writer.Write(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void WriteArray<T>(this NetworkWriter writer, T[] array)
|
||||||
|
{
|
||||||
|
if (array is null)
|
||||||
|
{
|
||||||
|
writer.WriteInt(-1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
writer.WriteInt(array.Length);
|
||||||
|
for (int i = 0; i < array.Length; i++)
|
||||||
|
writer.Write(array[i]);
|
||||||
|
}
|
||||||
|
|
||||||
public static void WriteUri(this NetworkWriter writer, Uri uri)
|
public static void WriteUri(this NetworkWriter writer, Uri uri)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user