コード例 #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);
 }