2020-02-21 23:36:07 +01:00
|
|
|
|
using QSB.Messaging;
|
|
|
|
|
using UnityEngine.Networking;
|
2020-02-14 22:14:24 +01:00
|
|
|
|
|
2020-02-24 19:55:16 +01:00
|
|
|
|
namespace QSB.TimeSync
|
2020-02-15 20:48:02 +01:00
|
|
|
|
{
|
2020-02-21 23:36:07 +01:00
|
|
|
|
public class WakeUpMessage : QSBMessage
|
2020-02-15 20:48:02 +01:00
|
|
|
|
{
|
2020-02-28 22:07:39 +01:00
|
|
|
|
public float ServerTime { get; set; }
|
2020-03-13 20:44:32 +01:00
|
|
|
|
public int LoopCount { get; set; }
|
2020-02-14 22:14:24 +01:00
|
|
|
|
|
2020-02-15 20:48:02 +01:00
|
|
|
|
public override void Deserialize(NetworkReader reader)
|
|
|
|
|
{
|
2020-02-28 22:07:39 +01:00
|
|
|
|
ServerTime = reader.ReadSingle();
|
2020-03-13 20:44:32 +01:00
|
|
|
|
LoopCount = reader.ReadInt16();
|
2020-02-14 22:14:24 +01:00
|
|
|
|
}
|
|
|
|
|
|
2020-02-15 20:48:02 +01:00
|
|
|
|
public override void Serialize(NetworkWriter writer)
|
|
|
|
|
{
|
2020-02-28 22:07:39 +01:00
|
|
|
|
writer.Write(ServerTime);
|
2020-03-13 20:44:32 +01:00
|
|
|
|
writer.Write(LoopCount);
|
2020-02-14 22:14:24 +01:00
|
|
|
|
}
|
2020-02-21 23:36:07 +01:00
|
|
|
|
|
2020-02-14 22:14:24 +01:00
|
|
|
|
}
|
|
|
|
|
}
|