quantum-space-buddies/QSB/ConversationSync/Events/ConversationStartEndMessage.cs

28 lines
628 B
C#
Raw Normal View History

2020-10-24 14:31:20 +00:00
using QSB.Messaging;
using QuantumUNET.Transport;
2020-10-24 14:31:20 +00:00
2020-11-03 17:56:48 +00:00
namespace QSB.ConversationSync.Events
2020-10-24 14:31:20 +00:00
{
2020-12-02 21:23:01 +00:00
public class ConversationStartEndMessage : PlayerMessage
{
2021-04-29 17:30:45 +00:00
public int TreeId { get; set; }
2020-12-02 21:23:01 +00:00
public uint PlayerId { get; set; }
public bool State { get; set; }
2020-10-24 14:31:20 +00:00
2020-12-23 12:58:45 +00:00
public override void Deserialize(QNetworkReader reader)
2020-12-02 21:23:01 +00:00
{
base.Deserialize(reader);
2021-04-29 17:30:45 +00:00
TreeId = reader.ReadInt32();
2020-12-02 21:23:01 +00:00
PlayerId = reader.ReadUInt32();
State = reader.ReadBoolean();
}
2020-10-24 14:31:20 +00:00
2020-12-23 12:58:45 +00:00
public override void Serialize(QNetworkWriter writer)
2020-12-02 21:23:01 +00:00
{
base.Serialize(writer);
2021-04-29 17:30:45 +00:00
writer.Write(TreeId);
2020-12-02 21:23:01 +00:00
writer.Write(PlayerId);
writer.Write(State);
}
}
2020-12-03 08:28:05 +00:00
}