using Mirror; using QSB.EchoesOfTheEye.AirlockSync.WorldObjects; using UnityEngine; namespace QSB.EchoesOfTheEye.AirlockSync.VariableSync; internal class AirlockVariableSyncer : RotatingElementsVariableSyncer { protected override Transform[] RotatingElements => WorldObject.AttachedObject._rotatingElements; protected override void Serialize(NetworkWriter writer) { base.Serialize(writer); var airlockInterface = WorldObject.AttachedObject; writer.Write(airlockInterface._currentRotation); writer.Write(airlockInterface._rotatingSpeed); writer.Write(airlockInterface._rotatingDirection); } protected override void Deserialize(NetworkReader reader) { base.Deserialize(reader); var airlockInterface = WorldObject.AttachedObject; airlockInterface._currentRotation = reader.Read(); airlockInterface._rotatingSpeed = reader.Read(); airlockInterface._rotatingDirection = reader.Read(); } }