Ejemplo n.º 1
0
        /// <summary>
        /// Initialize any local state or listeners
        /// </summary>
        protected override void Awake()
        {
            base.Awake();

            _wearableControl = WearableControl.Instance;

            _canvas.enabled    = false;
            _canvasGroup.alpha = 0f;

            ToggleLockScreen(false);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initialize any local state or listeners
        /// </summary>
        protected override void Awake()
        {
            base.Awake();

            _wearableControl = WearableControl.Instance;

            _canvas.enabled    = false;
            _canvasGroup.alpha = 0f;
            _messageText.text  = string.Empty;

            ToggleLockScreen(false);
        }
Ejemplo n.º 3
0
        private void Awake()
        {
            _wearableGameObjectsByProductVariant = new Dictionary <VariantType, GameObject>();
            _wearableGameObjectsByProduct        = new Dictionary <ProductType, GameObject>();

            if (_loadingStrategy == LoadingStrategy.AllAtOnce)
            {
                InitializeAllWearableModels();
            }

            _wearableControl = WearableControl.Instance;
            _wearableControl.DeviceConnected += OnDeviceConnected;
        }
Ejemplo n.º 4
0
        private void Awake()
        {
            _wearableControl = WearableControl.Instance;
            _wearableControl.GestureDetected += GestureDetected;

            // Establish a requirement for the referenced gesture.
            _requirement = gameObject.AddComponent <WearableRequirement>();

            if (_gesture != GestureId.None)
            {
                _requirement.EnableGesture(_gesture);
            }
        }
Ejemplo n.º 5
0
        private void Awake()
        {
            // Begin in absolute mode and cache the wearable controller.
            _wearableControl = WearableControl.Instance;
            _wearableControl.DeviceConnected += OnDeviceConnected;

            hurt = false;

            _mode             = RotationReference.Absolute;
            _inverseReference = Quaternion.identity;
            // Get audiosources
            audioSources = new AudioSource[] { left, right, jump, back, duck };
        }
Ejemplo n.º 6
0
        private void Start()
        {
            _wearableControl = WearableControl.Instance;

            _renderFramesLastSecond = 0.0f;
            _lastTransferSize       = 0;
            _lastTransferInterval   = null;
            _lastTimestamp          = null;
            _unityToDeviceOffset    = null;

            _renderFrameTimes = new Queue <float>();
            _sensorFrameTimes = new Queue <float>();
            _lastTransferTime = 0.0f;
        }
Ejemplo n.º 7
0
        protected override void Awake()
        {
            base.Awake();

            _wearableControl = WearableControl.Instance;
            _wearableControl.DeviceConnected        += OnDeviceConnected;
            _wearableControl.DeviceDisconnected     += OnDeviceDisconnected;
            _wearableControl.SensorServiceResumed   += OnSensorServiceResumed;
            _wearableControl.SensorServiceSuspended += OnSensorServiceSuspended;

            _launchExternalAppButton.onClick.AddListener(LaunchExternalApp);
            _continueWithoutBoseButton.onClick.AddListener(ContinueWithoutBoseAR);

            Hide();
        }
Ejemplo n.º 8
0
        private void Awake()
        {
            // Begin in absolute mode and cache the wearable controller.
            _wearableControl = WearableControl.Instance;


            // Establish a requirement for the rotation sensor
            WearableRequirement requirement = GetComponent <WearableRequirement>();

            if (requirement == null)
            {
                requirement = gameObject.AddComponent <WearableRequirement>();
            }

            requirement.EnableSensor(SensorId.Accelerometer);
            requirement.SetSensorUpdateInterval(SensorUpdateInterval.EightyMs);
        }
Ejemplo n.º 9
0
        private void Awake()
        {
            // Begin in absolute mode and cache the wearable controller.
            _wearableControl  = WearableControl.Instance;
            _mode             = RotationReference.Absolute;
            _inverseReference = Quaternion.identity;

            // Establish a requirement for the rotation sensor
            WearableRequirement requirement = GetComponent <WearableRequirement>();

            if (requirement == null)
            {
                requirement = gameObject.AddComponent <WearableRequirement>();
            }
            requirement.EnableSensor(SensorId.Rotation);
            requirement.SetSensorUpdateInterval(SensorUpdateInterval.EightyMs);
        }
Ejemplo n.º 10
0
        /// <summary>
        /// Initialize any local state or listeners
        /// </summary>
        protected override void Awake()
        {
            base.Awake();

            // If we haven't prepared a singleton yet, set this one up.
            if (IsSingletonInstance)
            {
                _wearableControl = WearableControl.Instance;

                _canvas.enabled    = false;
                _canvasGroup.alpha = 0f;
                _messageText.Clear();
                _closeButton.onClick.AddListener(OnCloseButtonClicked);

                DisableCloseButton();

                ToggleLockScreen(false);
            }
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Initialize any local state or listeners
        /// </summary>
        protected override void Awake()
        {
            base.Awake();

            _wearableControl = WearableControl.Instance;

            // If the user wants the device to always be required, mark the panel so that it is launched whenever
            // a device is disconnected.
            if (_showOnDisconnect)
            {
                var warningConnectUIPanel = GetComponentInChildren <WarningWearableConnectDisplay>();
                warningConnectUIPanel.ShowPanelOnDisconnect = _showOnDisconnect;
            }

            _canvas.enabled    = false;
            _canvasGroup.alpha = 0f;
            _messageText.text  = string.Empty;
            _closeButton.onClick.AddListener(OnCloseButtonClicked);

            DisableCloseButton();

            ToggleLockScreen(false);
        }
Ejemplo n.º 12
0
 private void Start()
 {
     _wearableControl = WearableControl.Instance;
 }
Ejemplo n.º 13
0
 internal WearableGesture(WearableControl wearableControl, GestureId gestureId)
 {
     _wearableControl = wearableControl;
     _gestureId       = gestureId;
 }
Ejemplo n.º 14
0
 internal WearableSensor(WearableControl wearableControl, SensorId id)
 {
     _wearableControl = wearableControl;
     _id = id;
 }
Ejemplo n.º 15
0
 private void Awake()
 {
     _wearableControl = WearableControl.Instance;
     _wearableControl.DeviceConnected += OnDeviceConnected;
     _wearableControl.GestureDetected += GestureDetected;
 }
Ejemplo n.º 16
0
 protected virtual void Start()
 {
     _wearableControl = WearableControl.Instance;
 }