mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-26 09:35:26 +00:00
49227bf5c9
* Remove wake up dependency from transform sync * Remove wake up dependency for all synced transforms * Remove comments * Remove obsolete QSBBehaviour component * Remove wakeup dependency in RespawnOnDeath * Prevent errors on MessageHandler and RespawnOnDeath when network not initialized * Add RespawnOnDeath only after network is initialized * wip * Prevent trying to add animator components multiple times * Reset sectors on scene load * Reset transform sync on scene change * Remove comment * Remove wakeup event dependency from WakeUpSync * Sync loop count
26 lines
630 B
C#
26 lines
630 B
C#
using QSB.Messaging;
|
|
using UnityEngine.Networking;
|
|
|
|
namespace QSB.TimeSync
|
|
{
|
|
public class WakeUpMessage : QSBMessage
|
|
{
|
|
public override MessageType MessageType => MessageType.WakeUp;
|
|
|
|
public float ServerTime { get; set; }
|
|
public int LoopCount { get; set; }
|
|
|
|
public override void Deserialize(NetworkReader reader)
|
|
{
|
|
ServerTime = reader.ReadSingle();
|
|
LoopCount = reader.ReadInt16();
|
|
}
|
|
|
|
public override void Serialize(NetworkWriter writer)
|
|
{
|
|
writer.Write(ServerTime);
|
|
writer.Write(LoopCount);
|
|
}
|
|
|
|
}
|
|
} |