private void OnClientReceiveMessage(PlayerStateMessage message)
 {
     if (message.AboutId == PlayerRegistry.LocalPlayerId)
     {
         return;
     }
     QSB.Helper.Events.Unity.RunWhen(
         () => PlayerRegistry.GetSyncObject <TransformSync.TransformSync>(message.AboutId) != null,
         () => PlayerRegistry.HandleFullStateMessage(message));
 }
        public override void OnReceiveRemote(AnimTriggerMessage message)
        {
            var animationSync = PlayerRegistry.GetSyncObject <AnimationSync>(message.AboutId);

            if (animationSync == null)
            {
                return;
            }
            animationSync.HandleTrigger((AnimTrigger)message.TriggerId, message.Value);
        }
        public override void OnReceiveRemote(WorldObjectMessage message)
        {
            if (!QSBSceneManager.IsInUniverse)
            {
                return;
            }
            var sector = WorldRegistry.GetObject <QSBSector>(message.ObjectId);

            if (sector == null)
            {
                DebugLog.ToConsole($"Sector with order id {message.ObjectId} not found!", MessageType.Warning);
                return;
            }

            var transformSync = PlayerRegistry.GetSyncObject <TransformSync>(message.AboutId);

            QSB.Helper.Events.Unity.RunWhen(() => transformSync.SyncedTransform != null,
                                            () => transformSync.SetReferenceSector(sector));
        }