예제 #1
0
        public MagicElementAttributeSlider(string Name, double DefaultValue, double MinValue, double MaxValue, OnSliderChange DelegateOnSliderChange)
            : base(Name, 200, 30)
        {
            Value         = DefaultValue;
            this.MinValue = MinValue;
            this.MaxValue = MaxValue;
            this.DelegateOnSliderChange = DelegateOnSliderChange;

            InitSliderX();
        }
예제 #2
0
    static public void SliderValue(Transform t, int m)
    {
        if (t != null)
        {
            Slider s = t.GetComponent <Slider>();

            OnSliderChange onChange = t.GetComponent <OnSliderChange>();

            if (onChange)
            {
                onChange.setValue = true;
            }
            s.value = m;

            if (onChange)
            {
                onChange.setValue = false;
            }
        }
    }
예제 #3
0
 public void UpdateSlider(float newValue)
 {
     slider.value = newValue;
     OnSliderChange?.Invoke();
 }