2020-03-04 20:46:16 +00:00
|
|
|
|
using QSB.Messaging;
|
2020-05-19 18:05:15 +00:00
|
|
|
|
using UnityEngine.Networking;
|
2020-03-04 20:46:16 +00:00
|
|
|
|
|
|
|
|
|
namespace QSB.Events
|
|
|
|
|
{
|
2020-05-19 18:05:15 +00:00
|
|
|
|
public class JoinMessage : PlayerMessage
|
2020-03-04 20:46:16 +00:00
|
|
|
|
{
|
|
|
|
|
public override MessageType MessageType => MessageType.Join;
|
2020-05-19 18:05:15 +00:00
|
|
|
|
|
|
|
|
|
public string PlayerName { get; set; }
|
|
|
|
|
|
|
|
|
|
public override void Deserialize(NetworkReader reader)
|
|
|
|
|
{
|
|
|
|
|
base.Deserialize(reader);
|
|
|
|
|
PlayerName = reader.ReadString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void Serialize(NetworkWriter writer)
|
|
|
|
|
{
|
|
|
|
|
base.Serialize(writer);
|
|
|
|
|
writer.Write(PlayerName);
|
|
|
|
|
}
|
2020-03-04 20:46:16 +00:00
|
|
|
|
}
|
|
|
|
|
}
|