quantum-space-buddies/QSB/Messages/PlayerMessage.cs

26 lines
577 B
C#
Raw Normal View History

2020-12-04 22:14:53 +00:00
using QuantumUNET;
2020-12-07 21:19:16 +00:00
using QuantumUNET.Messages;
2020-03-06 18:03:35 +00:00
2020-12-14 16:26:38 +00:00
namespace QSB.Messages
2020-03-06 18:03:35 +00:00
{
2020-12-04 09:23:27 +00:00
public class PlayerMessage : QSBMessageBase
2020-12-02 21:23:01 +00:00
{
public uint FromId { get; set; }
public uint AboutId { get; set; }
2020-12-13 22:25:23 +00:00
public bool OnlySendToServer { get; set; }
2020-08-20 18:31:10 +00:00
2020-12-04 09:23:27 +00:00
public override void Deserialize(QSBNetworkReader reader)
2020-12-02 21:23:01 +00:00
{
FromId = reader.ReadUInt32();
AboutId = reader.ReadUInt32();
2020-12-13 22:25:23 +00:00
OnlySendToServer = reader.ReadBoolean();
2020-12-02 21:23:01 +00:00
}
2020-03-06 18:03:35 +00:00
2020-12-04 09:23:27 +00:00
public override void Serialize(QSBNetworkWriter writer)
2020-12-02 21:23:01 +00:00
{
writer.Write(FromId);
writer.Write(AboutId);
2020-12-13 22:25:23 +00:00
writer.Write(OnlySendToServer);
2020-12-02 21:23:01 +00:00
}
}
2020-12-03 08:28:05 +00:00
}