Beispiel #1
0
        void HandleTouchpad(ButtonStage buttonStage, Vector2 axis)
        {
            if (!isTriggerDown)
            {
                switch (buttonStage)
                {
                case ButtonStage.PressDown:
                    SwitchModeScript.SwithMode(SwitchModeScript.currentMode == DualCameraDisplayMode.MIX ? DualCameraDisplayMode.VIRTUAL : DualCameraDisplayMode.MIX);
                    EffectsScript.ChangeShader(-1);

                    triggerCanvas.SetActive(SwitchModeScript.currentMode == DualCameraDisplayMode.MIX);
                    break;
                }
            }
        }
        void HandleGrip_SwitchEffects(ButtonStage buttonStage, Vector2 axis)
        {
            switch (buttonStage)
            {
            case ButtonStage.PressDown:
                EffectsScript.CurrentEffectNumber += 1;
                if (EffectsScript.CurrentEffectNumber == (int)ImageEffectType.TOTAL_NUM)
                {
                    EffectsScript.CurrentEffectNumber = -1;
                }

                EffectsScript.ChangeShader(EffectsScript.CurrentEffectNumber);
                break;
            }
        }
Beispiel #3
0
        private void OnTriggerEnter(Collider other)
        {
            if (other.name == "playerHeadCollision" || other.name == "HeadCollision")
            {
                if (EffectsScript == null)
                {
                    EffectsScript = GetComponent <ViveSR_Experience_Effects>();
                }

                //Assign the choosen shader.
                EffectsScript.ChangeShader(EffectsScript.CurrentEffectNumber);

                //Hide the current effect ball.
                gameObject.SetActive(false);
            }
        }