quantum-space-buddies/QSB/Player/Events/PlayerLeaveMessage.cs
Mister_Nebula 3249ce33af cleanup...
2020-11-03 21:33:48 +00:00

24 lines
650 B
C#

using QSB.Messaging;
using System;
using System.Linq;
using UnityEngine.Networking;
namespace QSB.Player.Events
{
public class PlayerLeaveMessage : PlayerMessage
{
public uint[] NetIds { get; set; }
public override void Deserialize(NetworkReader reader)
{
base.Deserialize(reader);
NetIds = reader.ReadString().Split(',').Select(x => Convert.ToUInt32(x)).ToArray();
}
public override void Serialize(NetworkWriter writer)
{
base.Serialize(writer);
writer.Write(string.Join(",", NetIds.Select(x => x.ToString()).ToArray()));
}
}
}