NetworkReaderExtensions - syntax

This commit is contained in:
MrGadget1024 2023-03-16 15:26:05 -04:00
parent ff5115e04a
commit ef86df8454

View File

@ -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?);
}
}