Пример #1
0
 public SliderAnimToWidget(SliderEx sliderEx, Action completeAction, float time, bool timeScaleEnable, float toNormalizedValue) :
     base(sliderEx, completeAction, time, timeScaleEnable)
 {
     this.sliderEx            = sliderEx;
     this.fromNormalizedValue = this.sliderEx.slider.normalizedValue;
     this.toNormalizedValue   = toNormalizedValue;
 }
Пример #2
0
 private static bool CreateSliderExIfNotExist(Slider slider, out SliderEx sliderEx)
 {
     if (slider == null)
     {
         Debug.LogError("call 'CreateSliderEx' function with null Slider param !");
         sliderEx = null;
         return(false);
     }
     else
     {
         sliderEx = slider.gameObject.GetComponent <SliderEx>();
         if (sliderEx == null)
         {
             var addedComponent = slider.gameObject.AddComponent <SliderEx>();
             addedComponent.slider = slider;
             sliderEx = addedComponent;
         }
         return(true);
     }
 }