mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-09 12:54:51 +00:00
28 lines
664 B
C#
28 lines
664 B
C#
using QSB.Messaging;
|
|
using QuantumUNET.Transport;
|
|
|
|
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(QNetworkReader reader)
|
|
{
|
|
base.Deserialize(reader);
|
|
PlayerName = reader.ReadString();
|
|
PlayerReady = reader.ReadBoolean();
|
|
PlayerState = (State)reader.ReadInt32();
|
|
}
|
|
|
|
public override void Serialize(QNetworkWriter writer)
|
|
{
|
|
base.Serialize(writer);
|
|
writer.Write(PlayerName);
|
|
writer.Write(PlayerReady);
|
|
writer.Write((int)PlayerState);
|
|
}
|
|
}
|
|
} |