Ejemplo n.º 1
0
 public SliderEventData(float o, float n, IMixedRealityPointer pointer, PinchSlider slider)
 {
     OldValue = o;
     NewValue = n;
     Pointer  = pointer;
     Slider   = slider;
 }
 private void Start()
 {
     if (grabReleaseAudioSource == null)
     {
         grabReleaseAudioSource = gameObject.AddComponent <AudioSource>();
     }
     if (passNotchAudioSource == null)
     {
         passNotchAudioSource = gameObject.AddComponent <AudioSource>();
     }
     slider = GetComponent <PinchSlider>();
     slider.OnInteractionStarted.AddListener(OnInteractionStarted);
     slider.OnInteractionEnded.AddListener(OnInteractionEnded);
     slider.OnValueUpdated.AddListener(OnValueUpdated);
 }
Ejemplo n.º 3
0
        private void Start()
        {
            if (grabReleaseAudioSource == null)
            {
                grabReleaseAudioSource = gameObject.AddComponent <AudioSource>();
            }
            if (passNotchAudioSource == null)
            {
                passNotchAudioSource = gameObject.AddComponent <AudioSource>();
            }

            slider = GetComponent <PinchSlider>();
            if (alignWithStepSlider && slider.UseSliderStepDivisions)
            {
                tickEvery = 1.0f / slider.SliderStepDivisions;
            }
            slider.OnInteractionStarted.AddListener(OnInteractionStarted);
            slider.OnInteractionEnded.AddListener(OnInteractionEnded);
            slider.OnValueUpdated.AddListener(OnValueUpdated);
        }