Пример #1
0
 private void SliderValueChanged(float value)
 {
     if (OnSliderValueChanged != null)
     {
         OnSliderValueChanged.Invoke(value);
     }
 }
Пример #2
0
    // Start is called before the first frame update


    void Start()
    {
        ChildSlider          = transform.Find("Slider").transform.GetComponent <Slider>();
        ChildSlider.minValue = sliderMin;
        ChildSlider.maxValue = sliderMax;
        ChildSlider.value    = Value;
        ChildSlider.onValueChanged.AddListener(delegate {
            Value = ChildSlider.value;
            OnSliderValueChanged.Invoke();
        });

        valueInput = transform.Find("ValueInput").transform.GetComponent <InputField>();
        valueInput.onValueChanged.AddListener(delegate {
            Value = float.Parse(valueInput.text);
        });
    }
Пример #3
0
 private void InvokeOnSliderValueChanged(float value)
 {
     OnSliderValueChanged?.Invoke(value);
 }