Exemplo n.º 1
0
    public void Period(SliderEventData data)
    {
        TMP_Text text  = GameObject.Find("Period").GetComponentInChildren <TMP_Text>();
        float    value = data.NewValue * 20f;

        text.text = "Period =" + value;
        _handMaterial.SetFloat("_Period_", value);
    }
Exemplo n.º 2
0
    public void LineEndTime(SliderEventData data)
    {
        TMP_Text text  = GameObject.Find("LineEndTime").GetComponentInChildren <TMP_Text>();
        float    value = data.NewValue;

        text.text = "LineEndTime =" + value;
        _handMaterial.SetFloat("_Line_End_Time_", value);
    }
Exemplo n.º 3
0
    public void PulseColorWidth(SliderEventData data)
    {
        TMP_Text text  = GameObject.Find("PulseColorWidth").GetComponentInChildren <TMP_Text>();
        float    value = data.NewValue;

        text.text = "PulseColorWidth =" + value;
        _handMaterial.SetFloat("_Pulse_Color_Width_", value);
    }
Exemplo n.º 4
0
    public void PulseAmplifyLeading(SliderEventData data)
    {
        TMP_Text text  = GameObject.Find("PulseAmplifyLeading").GetComponentInChildren <TMP_Text>();
        float    value = data.NewValue * 2f;

        text.text = "PulseAmplifyLeading =" + value;
        _handMaterial.SetFloat("_Pulse_Amplify_Leading_", value);
    }
Exemplo n.º 5
0
    public void PulseLineFuzz(SliderEventData data)
    {
        TMP_Text text  = GameObject.Find("Intensity").GetComponentInChildren <TMP_Text>();
        float    value = data.NewValue;

        text.text = "EdgeEidth =" + value;
        _handMaterial.SetFloat("_Pulse_Line_Fuzz_", value);
    }
Exemplo n.º 6
0
    public void PulseNoiseFrequency(SliderEventData data)
    {
        TMP_Text text  = GameObject.Find("PulseNoiseFrequency").GetComponentInChildren <TMP_Text>();
        float    value = data.NewValue * 100f;

        text.text = "PulseNoiseFrequency =" + value;
        _handMaterial.SetFloat("_Pulse_Noise_Frequency_", value);
    }
Exemplo n.º 7
0
    public void PulseOuterSize(SliderEventData data)
    {
        TMP_Text text  = GameObject.Find("PulseOuterSize").GetComponentInChildren <TMP_Text>();
        float    value = data.NewValue * 2f;

        text.text = "Pulse_Outer_Size =" + value;
        _handMaterial.SetFloat("_Pulse_Outer_Size_", value);
    }
Exemplo n.º 8
0
    public void PulseTailFuzz(SliderEventData data)
    {
        TMP_Text text  = GameObject.Find("PulseTailFuzz").GetComponentInChildren <TMP_Text>();
        float    value = data.NewValue;

        text.text = "PulseTailFuzz =" + value;
        _handMaterial.SetFloat("_Pulse_Tail_Fuzz_", value);
    }
Exemplo n.º 9
0
    public void FilterWidth(SliderEventData data)
    {
        TMP_Text text  = GameObject.Find("FillterWidth").GetComponentInChildren <TMP_Text>();
        float    value = data.NewValue * 10f;

        text.text = "FilterWidth =" + value;
        _handMaterial.SetFloat("_Filter_Width_", value);
    }
Exemplo n.º 10
0
    //WristFadeStart
    public void WristFadeStart(SliderEventData data)
    {
        TMP_Text text  = GameObject.Find("WristFadeStart").GetComponentInChildren <TMP_Text>();
        float    value = data.NewValue;

        text.text = "WristFadeStart =" + value;
        _handMaterial.SetFloat("_Wrist_Fade_Start_", value);
    }
Exemplo n.º 11
0
 public void OnSliderUpdated(SliderEventData eventData)
 {
     if (transformLandingGear != null)
     {
         // Rotate the target object using Slider's eventData.NewValue
         transformLandingGear.localPosition = new Vector3(transformLandingGear.localPosition.x, 1.0f - eventData.NewValue, transformLandingGear.localPosition.z);
     }
 }
Exemplo n.º 12
0
    public void FillStartTime(SliderEventData data)
    {
        TMP_Text text  = GameObject.Find("FillStartTime").GetComponentInChildren <TMP_Text>();
        float    value = data.NewValue;

        text.text = "FillStartTime=" + value;
        _handMaterial.SetFloat("_Fill_Start_Time_", value);
    }
Exemplo n.º 13
0
    public void FillColorB(SliderEventData data)
    {
        TMP_Text text  = GameObject.Find("FillColorB").GetComponentInChildren <TMP_Text>();
        float    value = data.NewValue * 255f;

        text.text    = "FillColor Blue =" + value;
        _fillColor.b = value;
        _handMaterial.SetColor("_Fill_Color_", _fillColor);
    }
Exemplo n.º 14
0
 public void OnSliderUpdated(SliderEventData eventData)
 {
     if (ClippingBoxSize != null)
     {
         // Rotate the target object using Slider's eventData.NewValue
         //Debug.Log(ClippingBoxSize.localPosition.x);
         ClippingBoxSize.transform.localScale = new Vector3(1.0f - eventData.NewValue, ClippingBoxSize.transform.localScale.y, ClippingBoxSize.transform.localScale.z);
     }
 }
Exemplo n.º 15
0
    public void LineColorR(SliderEventData data)
    {
        TMP_Text text  = GameObject.Find("LineColorR ").GetComponentInChildren <TMP_Text>();
        float    value = data.NewValue * 255f;

        text.text    = "LineColor Red =" + value;
        _lineColor.r = value;
        _handMaterial.SetColor("_Line_Color_", _lineColor);
    }
Exemplo n.º 16
0
    // Start is called before the first frame update
    public void updateTemporalValue(SliderEventData eventData)
    {
        DateTime dateTime = convertToYear(eventData.NewValue);

        setText(dateTime.Year.ToString());
        var EventArgs = new SliderValueEventArgs();

        EventArgs.value = eventData.NewValue;
        OnLowerBoundValueChanged(this, EventArgs);
    }
Exemplo n.º 17
0
    // Start is called before the first frame update
    public void updateDistanceValue(SliderEventData eventData)
    {
        distance = convertToDistance(eventData.NewValue);

        setText(distance.ToString());
        var EventArgs = new DistanceEventArgs();

        EventArgs.distance_value = distance;
        OnDistanceChanged(this, EventArgs);
    }
Exemplo n.º 18
0
Arquivo: bubble.cs Projeto: nuoma/css
    //assign this to vertical slider
    public void verticalMoveMRTK(SliderEventData newValue)
    {
        float VValuePost = 2 * newValue.NewValue - 1.0f;//change scale from 0~1 to -1~1

        verticalMultiplier = VValuePost * 0.22f;
        //if (VValuePost > 0.15 || VValuePost < -0.15)
        //    verticalMultiplier = VValuePost;
        //else
        //   verticalMultiplier = 0;
    }
Exemplo n.º 19
0
Arquivo: bubble.cs Projeto: nuoma/css
    public void horizontalMoveMRTK(SliderEventData newValue)
    {
        float HValuePost = 2 * newValue.NewValue - 1.0f;//change scale from 0~1 to -1~1

        horizontalMultiplier = HValuePost * 0.31f;
        //if (HValuePost > 0.15 || HValuePost < -0.15)
        //    horizontalMultiplier = HValuePost;
        //else
        //    horizontalMultiplier = 0;
    }
Exemplo n.º 20
0
 public void Explode(SliderEventData eventData)
 {
     if (explodingStructures.Count == 0)
     {
         return;
     }
     foreach (BrainStructure sub in explodingStructures)
     {
         sub.MoveToPosition(eventData.NewValue * 0.01f);
     }
 }
Exemplo n.º 21
0
    public void OnSliderUpdateBlue(SliderEventData eventData)
    {
        TargetRenderer = GetComponentInChildren <Renderer>();
        if ((TargetRenderer != null) && (TargetRenderer.material != null))
        {
            angleController = eventData.NewValue * 360;
            TargetRenderer.material.SetFloat("_Angle", angleController);

            //TargetRenderer.material.color = new Color(TargetRenderer.sharedMaterial.color.r, TargetRenderer.sharedMaterial.color.g, eventData.NewValue);
        }
    }
Exemplo n.º 22
0
    public void OnSliderUpdated(SliderEventData eventData)
    {
        if (textMesh == null)
        {
            textMesh = GetComponent <TextMeshPro>();
        }

        if (textMesh != null)
        {
            textMesh.text = SlopeController.Instance.slopeAngle.ToString();
        }
    }
Exemplo n.º 23
0
        ///////////////////////////////////////////////////////////////////////////////////////////////
        /// MRTK Callbacks
        ///////////////////////////////////////////////////////////////////////////////////////////////

        internal void MRTK_Slider_Callback(SliderEventData _data)
        {
            if (EnableCurve)
            {
                SetCurveBlendValue(_data.NewValue * 2.0f - 1.0f);
            }
            else
            {
                SetHololensBlend(_data.NewValue);
                SetProjectorBlend(_data.NewValue);
            }
        }
Exemplo n.º 24
0
        public void OnSliderUpdated(SliderEventData eventData)
        {
            if (textMesh == null)
            {
                textMesh = GetComponent <TextMeshPro>();
            }

            if (textMesh != null)
            {
                textMesh.text = $"{eventData.NewValue:F2}";
            }
        }
Exemplo n.º 25
0
        private void OnMinimalPredictionProbabilityUpdated(SliderEventData eventData)
        {
            if (eventData == null)
            {
                return;
            }
            double value = eventData.NewValue;

            minimalPredictionProbabilityLabel.text = $"{value:0.0}";
            ObjectDetectionService.ChangeMinimalPredictionProbability(value);
            Debug.Log($"Changed minimal prediction probability to {value:0.0}");
        }
Exemplo n.º 26
0
        private void OnFixedTrackerCountUpdated(SliderEventData eventData)
        {
            if (eventData == null)
            {
                return;
            }
            int value = (int)(eventData.NewValue * 20f);

            fixedTrackerCountLabel.text = $"{value}";
            ObjectTrackingService.ChangeFixedTrackerCount(value);
            Debug.Log($"Changed tracker count value to {value}");
        }
Exemplo n.º 27
0
        private void OnMaxConcurrentRequestUpdated(SliderEventData eventData)
        {
            if (eventData == null)
            {
                return;
            }
            int value = (int)(eventData.NewValue * 20f);

            maxConcurrentRequestLabel.text = $"{value}";
            ObjectDetectionService.ChangeMaxConcurrentRequestLimit(value);
            Debug.Log($"Max object detection request limit changed to {value}");
        }
Exemplo n.º 28
0
    public void OnScaleSliderUpdated(SliderEventData eventData)
    {
        var diff = scale_max - scale_min;
        var val  = (int)(eventData.NewValue * diff + scale_min);

        mapScale = val;

        if (scaleTextMesh == null)
        {
            return;
        }
        scaleTextMesh.text = $"{val:D}";
    }
 public void OnSliderUpdated(SliderEventData eventData)
 {
     if (brain != null)
     {
         Quaternion target = Quaternion.Euler(0, eventData.NewValue * 360, 0);
         brain.transform.rotation = target;
     }
     if (textMeshPro != null)
     {
         textMeshPro.text = $": {eventData.NewValue}";
     }
     Debug.Log(eventData.NewValue);
 }
Exemplo n.º 30
0
    public void OnSliderUpdate(SliderEventData eventData)
    {
        if (textMesh == null)
        {
            textMesh = GetComponent <TextMeshPro> ();
        }

        if (textMesh != null)
        {
            float num = eventData.NewValue * 10;
            textMesh.text = $"{num:F1}";
        }
    }