mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
NetworkReaderExtensions - syntax
This commit is contained in:
parent
ff5115e04a
commit
ef86df8454
@ -335,11 +335,7 @@ public static Sprite ReadSprite(this NetworkReader reader)
|
||||
return Sprite.Create(texture, reader.ReadRect(), reader.ReadVector2());
|
||||
}
|
||||
|
||||
public static DateTime ReadDateTime(this NetworkReader reader)
|
||||
{
|
||||
return DateTime.FromOADate(reader.ReadDouble());
|
||||
}
|
||||
|
||||
public static DateTime ReadDateTime(this NetworkReader reader) => DateTime.FromOADate(reader.ReadDouble());
|
||||
public static DateTime? ReadDateTimeNullable(this NetworkReader reader) => reader.ReadBool() ? ReadDateTime(reader) : default(DateTime?);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user