Ejemplo n.º 1
0
        protected virtual void Update()
        {
            uint checkIndex = VRTK_DeviceFinder.GetControllerIndex(gameObject);

            if (checkIndex != index)
            {
                uint previousIndex = index;
                index = checkIndex;
                //If the controller model listeners have already been registered, then make sure to unsub and sub when index changes.
                if (controllerModelWaitSubscribed)
                {
                    ManageControllerModelListeners(false);
                    ManageControllerModelListeners(true);
                }
                OnControllerIndexChanged(SetEventPayload(previousIndex));
                SetControllerType();
            }

            VRTK_SDK_Bridge.ControllerProcessUpdate(VRTK_ControllerReference.GetControllerReference(index));

            if (aliasController != null && gameObject.activeInHierarchy && !aliasController.activeSelf)
            {
                aliasController.SetActive(true);
            }
        }
Ejemplo n.º 2
0
        // Token: 0x06001753 RID: 5971 RVA: 0x0007CC28 File Offset: 0x0007AE28
        protected virtual void Update()
        {
            uint controllerIndex = VRTK_DeviceFinder.GetControllerIndex(base.gameObject);

            if (controllerIndex != this.index)
            {
                uint eventPayload = this.index;
                this.index = controllerIndex;
                this.OnControllerIndexChanged(this.SetEventPayload(eventPayload));
            }
            VRTK_SDK_Bridge.ControllerProcessUpdate(VRTK_ControllerReference.GetControllerReference(this.index), null);
            if (this.aliasController != null && base.gameObject.activeInHierarchy && !this.aliasController.activeSelf)
            {
                this.aliasController.SetActive(true);
            }
        }
Ejemplo n.º 3
0
        protected virtual void Update()
        {
            uint checkIndex = VRTK_DeviceFinder.GetControllerIndex(gameObject);

            if (index < uint.MaxValue && checkIndex != index)
            {
                uint previousIndex = index;
                OnControllerIndexChanged(SetEventPayload(previousIndex));
            }

            VRTK_SDK_Bridge.ControllerProcessUpdate(VRTK_ControllerReference.GetControllerReference(index));

            if (aliasController != null && gameObject.activeInHierarchy && !aliasController.activeSelf)
            {
                aliasController.SetActive(true);
            }
        }
Ejemplo n.º 4
0
        private void Update()
        {
            var checkIndex = VRTK_DeviceFinder.GetControllerIndex(gameObject);

            if (currentIndex < uint.MaxValue && checkIndex != currentIndex)
            {
                var previousIndex = currentIndex;
                currentIndex = checkIndex;
                OnControllerIndexChanged(SetEventPayload(previousIndex));
            }

            VRTK_SDK_Bridge.ControllerProcessUpdate(currentIndex);

            if (aliasController && gameObject.activeInHierarchy && !aliasController.activeSelf)
            {
                aliasController.SetActive(true);
            }
        }