/// <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); }
/// <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); }
private void Awake() { _wearableGameObjectsByProductVariant = new Dictionary <VariantType, GameObject>(); _wearableGameObjectsByProduct = new Dictionary <ProductType, GameObject>(); if (_loadingStrategy == LoadingStrategy.AllAtOnce) { InitializeAllWearableModels(); } _wearableControl = WearableControl.Instance; _wearableControl.DeviceConnected += OnDeviceConnected; }
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); } }
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 }; }
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; }
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(); }
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); }
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); }
/// <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); } }
/// <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); }
private void Start() { _wearableControl = WearableControl.Instance; }
internal WearableGesture(WearableControl wearableControl, GestureId gestureId) { _wearableControl = wearableControl; _gestureId = gestureId; }
internal WearableSensor(WearableControl wearableControl, SensorId id) { _wearableControl = wearableControl; _id = id; }
private void Awake() { _wearableControl = WearableControl.Instance; _wearableControl.DeviceConnected += OnDeviceConnected; _wearableControl.GestureDetected += GestureDetected; }
protected virtual void Start() { _wearableControl = WearableControl.Instance; }