mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-24 21:48:35 +01:00
Compare commits
No commits in common. "2d3ce30ff223c6da7078a6ac7c568e57ac3e49fa" and "636522bc3e9d0e1318c393b2fa3dfa687e6b4abf" have entirely different histories.
2d3ce30ff2
...
636522bc3e
6 changed files with 6 additions and 19 deletions
|
@ -67,9 +67,6 @@ Improvements
|
|||
- **Use TitleContainer for opening streams where possible**
|
||||
- Set GraphicsResource Name when loading assets using RawContentManager
|
||||
|
||||
Removals
|
||||
- Marked features related to Lidgren.Network as obsolete
|
||||
|
||||
## 5.1.0
|
||||
### MLEM
|
||||
Additions
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
- **MLEM** is the base package, which provides extension methods and additional features for MonoGame
|
||||
- **MLEM.Ui** features a mouse, keyboard, gamepad and touch ready Ui system that features automatic anchoring, sizing and several ready-to-use element types
|
||||
- **MLEM.Extended** ties in with MonoGame.Extended and other MonoGame libraries
|
||||
- **MLEM.Data** provides simple data handling
|
||||
- **MLEM.Data** provides simple data and network handling
|
||||
- **MLEM.Startup** combines MLEM with some other useful libraries into a quick Game startup class
|
||||
- **MLEM.Templates** contains cross-platform project templates
|
||||
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<Authors>Ellpeck</Authors>
|
||||
<Description>Simple data handling for MLEM Library for Extending MonoGame</Description>
|
||||
<Description>Simple data and network handling for MLEM Library for Extending MonoGame</Description>
|
||||
<PackageReleaseNotes>See the full changelog at https://mlem.ellpeck.de/CHANGELOG</PackageReleaseNotes>
|
||||
<PackageTags>monogame ellpeck mlem utility extensions data serialize</PackageTags>
|
||||
<PackageTags>monogame ellpeck mlem utility extensions data network serialize</PackageTags>
|
||||
<PackageProjectUrl>https://mlem.ellpeck.de/</PackageProjectUrl>
|
||||
<RepositoryUrl>https://github.com/Ellpeck/MLEM</RepositoryUrl>
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
|
@ -22,14 +22,13 @@
|
|||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<ProjectReference Include="..\MLEM\MLEM.csproj" />
|
||||
|
||||
<!--TODO remove lidgren support eventually (methods marked as obsolete since 5.2.0)-->
|
||||
<PackageReference Include="Lidgren.Network" Version="1.0.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Newtonsoft.Json.Bson" Version="1.0.2">
|
||||
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.0.1641">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.0.1641">
|
||||
<PackageReference Include="Newtonsoft.Json.Bson" Version="1.0.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
|
|
@ -10,7 +10,6 @@ namespace MLEM.Data {
|
|||
/// It can be used both for serialization of outgoing packets, and deserialization of incoming packets.
|
||||
/// Before serializing and deserializing an object, each of the object's fields has to have a handler. New handlers can be added using <see cref="AddHandler{T}(System.Action{Lidgren.Network.NetBuffer,T},System.Func{Lidgren.Network.NetBuffer,T})"/> or <see cref="AddHandler{T}(Newtonsoft.Json.JsonSerializer)"/>.
|
||||
/// </summary>
|
||||
[Obsolete("Lidgren.Network support is deprecated. Consider using LiteNetLib or a custom implementation instead.")]
|
||||
public class NetBufferSerializer {
|
||||
|
||||
private readonly Dictionary<Type, Action<NetBuffer, object>> writeFunctions = new Dictionary<Type, Action<NetBuffer, object>>();
|
||||
|
|
|
@ -19,7 +19,6 @@ namespace MLEM.Data {
|
|||
/// </summary>
|
||||
/// <param name="buffer">The buffer to write to</param>
|
||||
/// <param name="vector">The vector to write</param>
|
||||
[Obsolete("Lidgren.Network support is deprecated. Consider using LiteNetLib or a custom implementation instead.")]
|
||||
public static void Write(this NetBuffer buffer, Vector2 vector) {
|
||||
buffer.Write(vector.X);
|
||||
buffer.Write(vector.Y);
|
||||
|
@ -30,7 +29,6 @@ namespace MLEM.Data {
|
|||
/// </summary>
|
||||
/// <param name="buffer">The buffer to read from</param>
|
||||
/// <returns>The read vector</returns>
|
||||
[Obsolete("Lidgren.Network support is deprecated. Consider using LiteNetLib or a custom implementation instead.")]
|
||||
public static Vector2 ReadVector2(this NetBuffer buffer) {
|
||||
return new Vector2(buffer.ReadFloat(), buffer.ReadFloat());
|
||||
}
|
||||
|
@ -40,7 +38,6 @@ namespace MLEM.Data {
|
|||
/// </summary>
|
||||
/// <param name="buffer">The buffer to write to</param>
|
||||
/// <param name="guid">The guid to write</param>
|
||||
[Obsolete("Lidgren.Network support is deprecated. Consider using LiteNetLib or a custom implementation instead.")]
|
||||
public static void Write(this NetBuffer buffer, Guid guid) {
|
||||
buffer.Write(guid.ToByteArray());
|
||||
}
|
||||
|
@ -50,7 +47,6 @@ namespace MLEM.Data {
|
|||
/// </summary>
|
||||
/// <param name="buffer">The buffer to read from</param>
|
||||
/// <returns>The read guid</returns>
|
||||
[Obsolete("Lidgren.Network support is deprecated. Consider using LiteNetLib or a custom implementation instead.")]
|
||||
public static Guid ReadGuid(this NetBuffer buffer) {
|
||||
return new Guid(buffer.ReadBytes(16));
|
||||
}
|
||||
|
@ -60,7 +56,6 @@ namespace MLEM.Data {
|
|||
/// </summary>
|
||||
/// <param name="buffer">The buffer to write to</param>
|
||||
/// <param name="direction">The direction to write</param>
|
||||
[Obsolete("Lidgren.Network support is deprecated. Consider using LiteNetLib or a custom implementation instead.")]
|
||||
public static void Write(this NetBuffer buffer, Direction2 direction) {
|
||||
buffer.Write((short) direction);
|
||||
}
|
||||
|
@ -70,7 +65,6 @@ namespace MLEM.Data {
|
|||
/// </summary>
|
||||
/// <param name="buffer">The buffer to read from</param>
|
||||
/// <returns>The read direction</returns>
|
||||
[Obsolete("Lidgren.Network support is deprecated. Consider using LiteNetLib or a custom implementation instead.")]
|
||||
public static Direction2 ReadDirection(this NetBuffer buffer) {
|
||||
return (Direction2) buffer.ReadInt16();
|
||||
}
|
||||
|
@ -82,7 +76,6 @@ namespace MLEM.Data {
|
|||
/// <param name="obj">The object to write</param>
|
||||
/// <param name="serializer">The JSON serializer to use</param>
|
||||
/// <typeparam name="T">The type of object written</typeparam>
|
||||
[Obsolete("Lidgren.Network support is deprecated. Consider using LiteNetLib or a custom implementation instead.")]
|
||||
public static void WriteObject<T>(this NetBuffer buffer, T obj, JsonSerializer serializer) {
|
||||
if (EqualityComparer<T>.Default.Equals(obj, default)) {
|
||||
buffer.Write(0);
|
||||
|
@ -104,7 +97,6 @@ namespace MLEM.Data {
|
|||
/// <param name="serializer">The JSON serializer to use</param>
|
||||
/// <typeparam name="T">The type of object read</typeparam>
|
||||
/// <returns>The read object</returns>
|
||||
[Obsolete("Lidgren.Network support is deprecated. Consider using LiteNetLib or a custom implementation instead.")]
|
||||
public static T ReadObject<T>(this NetBuffer buffer, JsonSerializer serializer) {
|
||||
var length = buffer.ReadInt32();
|
||||
if (length <= 0)
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
- **MLEM** is the base package, which provides extension methods and additional features for MonoGame
|
||||
- **MLEM.Ui** features a mouse, keyboard, gamepad and touch ready Ui system that features automatic anchoring, sizing and several ready-to-use element types
|
||||
- **MLEM.Extended** ties in with MonoGame.Extended and other MonoGame libraries
|
||||
- **MLEM.Data** provides simple data handling
|
||||
- **MLEM.Data** provides simple data and network handling
|
||||
- **MLEM.Startup** combines MLEM with some other useful libraries into a quick Game startup class
|
||||
- **MLEM.Templates** contains cross-platform project templates
|
||||
|
||||
|
|
Loading…
Reference in a new issue