quantum-space-buddies/QSB/Messaging/ServerTimeMessage.cs

25 lines
619 B
C#
Raw Normal View History

2020-08-10 12:16:07 +01:00
using UnityEngine.Networking;
2020-08-09 19:33:36 +01:00
namespace QSB.Messaging
2020-02-15 20:48:02 +01:00
{
2020-08-09 21:46:51 +01:00
public class ServerTimeMessage : PlayerMessage
2020-02-15 20:48:02 +01:00
{
public float ServerTime { get; set; }
public int LoopCount { get; set; }
2020-02-15 20:48:02 +01:00
public override void Deserialize(NetworkReader reader)
{
2020-08-10 18:17:54 +02:00
base.Deserialize(reader);
ServerTime = reader.ReadSingle();
LoopCount = reader.ReadInt16();
}
2020-02-15 20:48:02 +01:00
public override void Serialize(NetworkWriter writer)
{
2020-08-10 18:17:54 +02:00
base.Serialize(writer);
writer.Write(ServerTime);
writer.Write(LoopCount);
}
2020-02-21 23:36:07 +01:00
}
}