UIWidgetUtils.cs 328 B

12345678910111213141516
  1. using System;
  2. using DG.Tweening;
  3. namespace ExtensionMethods
  4. {
  5. public static class UIWidgetUtils
  6. {
  7. public static Tweener DOFade(this UIWidget widget, float endValue, float duration)
  8. {
  9. return DOTween.To(() => widget.alpha, delegate(float a)
  10. {
  11. widget.alpha = a;
  12. }, endValue, duration);
  13. }
  14. }
  15. }