quantum-space-buddies/QSB/Player/Events/PlayerStateMessage.cs
Mister_Nebula 10af92f4a1 changes
2020-12-11 22:42:21 +00:00

29 lines
659 B
C#

using QSB.Messaging;
using QuantumUNET;
namespace QSB.Player.Events
{
public class PlayerStateMessage : PlayerMessage
{
public string PlayerName { get; set; }
public bool PlayerReady { get; set; }
public State PlayerState { get; set; }
public override void Deserialize(QSBNetworkReader reader)
{
base.Deserialize(reader);
PlayerName = reader.ReadString();
PlayerReady = reader.ReadBoolean();
PlayerState = (State)reader.ReadInt32();
}
public override void Serialize(QSBNetworkWriter writer)
{
base.Serialize(writer);
writer.Write(PlayerName);
writer.Write(PlayerReady);
writer.Write((int)PlayerState);
}
}
}