protected override Transform InitLocalTransform()
        {
            SectorSync.SetSectorDetector(Locator.GetProbe().GetSectorDetector());
            var body = GetProbe();

            SetSocket(Player.CameraBody.transform);
            Player.ProbeBody = body.gameObject;

            return(body);
        }
예제 #2
0
        private void Start()
        {
            Instance = this;
            DebugLog.Screen("Start SectorSync");
            _playerSectors = new Dictionary <uint, Transform>();

            _sectorHandler = new MessageHandler <SectorMessage>();
            _sectorHandler.OnClientReceiveMessage += OnClientReceiveMessage;
            _sectorHandler.OnServerReceiveMessage += OnServerReceiveMessage;

            QSB.Helper.HarmonyHelper.AddPrefix <SectorDetector>("AddSector", typeof(Patches), "PreAddSector");
        }
        protected override Transform InitLocalTransform()
        {
            SectorSync.SetSectorDetector(Locator.GetPlayerSectorDetector());
            var body = Locator.GetPlayerCamera().gameObject.transform;

            Player.Camera     = Locator.GetPlayerCamera();
            Player.CameraBody = body.gameObject;

            Player.IsReady = true;
            QSBEventManager.FireEvent(EventNames.QSBPlayerReady, true);
            DebugLog.DebugWrite("PlayerCameraSync init done - Request state!");
            QSBEventManager.FireEvent(EventNames.QSBPlayerStatesRequest);

            return(body);
        }
 protected override Transform InitLocalTransform()
 {
     SectorSync.SetSectorDetector(Locator.GetShipDetector().GetComponent <SectorDetector>());
     return(GetShipModel().Find("Module_Cockpit/Geo_Cockpit/Cockpit_Geometry/Cockpit_Exterior"));
 }