コード例 #1
0
        private void Awake()
        {
            _probe = QSBWorldSync.GetUnityObjects <QSBProbe>().First(x => gameObject.transform.IsChildOf(x.transform));
            if (_probe == null)
            {
                DebugLog.ToConsole($"Error - Couldn't find QSBProbe!", OWML.Common.MessageType.Error);
            }

            _light = GetComponent <OWLight2>();
            _probe.OnAnchorProbe        += OnProbeAnchorToSurface;
            _probe.OnStartRetrieveProbe += OnStartRetrieveProbe;
            _probe.OnRetrieveProbe      += OnFinishRetrieveProbe;
        }
コード例 #2
0
        private void Awake()
        {
            _probe = QSBWorldSync.GetUnityObjects <QSBProbe>().First(x => gameObject.transform.IsChildOf(x.transform));
            if (_probe == null)
            {
                DebugLog.ToConsole($"Error - Couldn't find QSBProbe!", OWML.Common.MessageType.Error);
            }

            _light = GetComponent <OWLight2>();
            //_intensity = _light.GetLight().intensity;
            _light.GetLight().enabled = false;
            enabled = false;
            _probe.OnLaunchProbe   += OnLaunch;
            _probe.OnAnchorProbe   += OnAnchorOrRetrieve;
            _probe.OnRetrieveProbe += OnAnchorOrRetrieve;
        }