mirror of
https://github.com/Sanae6/SmoOnlineServer.git
synced 2024-12-01 07:33:07 +00:00
534a6c9655
speedrun flag
18 lines
No EOL
406 B
C#
18 lines
No EOL
406 B
C#
using System.Runtime.InteropServices;
|
|
|
|
namespace Shared.Packet.Packets;
|
|
|
|
[Packet(PacketType.Shine)]
|
|
public struct ShinePacket : IPacket {
|
|
public int ShineId;
|
|
|
|
public short Size => 4;
|
|
|
|
public void Serialize(Span<byte> data) {
|
|
MemoryMarshal.Write(data, ref ShineId);
|
|
}
|
|
|
|
public void Deserialize(ReadOnlySpan<byte> data) {
|
|
ShineId = MemoryMarshal.Read<int>(data);
|
|
}
|
|
} |