quantum-space-buddies/QSB/Player/Events/PlayerInformationMessage.cs

48 lines
1.4 KiB
C#
Raw Normal View History

using QSB.ClientServerStateSync;
using QSB.Messaging;
using QuantumUNET.Transport;
2020-11-03 21:33:48 +00:00
namespace QSB.Player.Events
{
public class PlayerInformationMessage : PlayerMessage
2020-12-02 21:23:01 +00:00
{
public string PlayerName { get; set; }
public bool IsReady { get; set; }
public bool FlashlightActive { get; set; }
public bool SuitedUp { get; set; }
public bool ProbeLauncherEquipped { get; set; }
public bool SignalscopeEquipped { get; set; }
public bool TranslatorEquipped { get; set; }
public bool ProbeActive { get; set; }
public ClientState ClientState { get; set; }
2020-12-11 22:42:21 +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);
PlayerName = reader.ReadString();
IsReady = reader.ReadBoolean();
FlashlightActive = reader.ReadBoolean();
SuitedUp = reader.ReadBoolean();
ProbeLauncherEquipped = reader.ReadBoolean();
SignalscopeEquipped = reader.ReadBoolean();
TranslatorEquipped = reader.ReadBoolean();
ProbeActive = reader.ReadBoolean();
ClientState = (ClientState)reader.ReadInt32();
2020-12-02 21:23:01 +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);
writer.Write(PlayerName);
writer.Write(IsReady);
writer.Write(FlashlightActive);
writer.Write(SuitedUp);
writer.Write(ProbeLauncherEquipped);
writer.Write(SignalscopeEquipped);
writer.Write(TranslatorEquipped);
writer.Write(ProbeActive);
writer.Write((int)ClientState);
2020-12-02 21:23:01 +00:00
}
}
}