quantum-space-buddies/QSB/Events/NameMessage.cs

24 lines
563 B
C#
Raw Normal View History

2020-03-06 18:03:35 +00:00
using QSB.Messaging;
using UnityEngine.Networking;
namespace QSB.Events
{
public abstract class NameMessage : QSBMessage
{
public uint SenderId { get; set; }
public string PlayerName { get; set; }
public override void Deserialize(NetworkReader reader)
{
PlayerName = reader.ReadString();
SenderId = reader.ReadUInt32();
}
public override void Serialize(NetworkWriter writer)
{
writer.Write(PlayerName);
writer.Write(SenderId);
}
}
}