Beispiel #1
0
 public override void Back()
 {
     for (int i = 0; i < TargetList.Count; i++)
     {
         Coffee.UIExtensions.UIGradient uiscript =
             TargetList[i].GetComponent <Coffee.UIExtensions.UIGradient>() ??
             TargetList[i].gameObject.AddComponent <Coffee.UIExtensions.UIGradient>();
         uiscript.direction = Direction;
         DOTween.To(() => uiscript.color1, x => uiscript.color1 = x, _initColor[0], UIChangeSetting.ColorChangeSpeed);
         DOTween.To(() => uiscript.color2, x => uiscript.color2 = x, _initColor[1], UIChangeSetting.ColorChangeSpeed);
     }
 }
Beispiel #2
0
 public override void Play()
 {
     for (int i = 0; i < TargetList.Count; i++)
     {
         Coffee.UIExtensions.UIGradient uiscript =
             TargetList[i].GetComponent <Coffee.UIExtensions.UIGradient>() ??
             TargetList[i].gameObject.AddComponent <Coffee.UIExtensions.UIGradient>();
         uiscript.direction = Direction;
         if (_initColor == null)
         {
             _initColor = new List <Color>();
         }
         if (_initColor.Count == 0)
         {
             _initColor.Add(uiscript.color1);
             _initColor.Add(uiscript.color2);
         }
         DOTween.To(() => uiscript.color1, x => uiscript.color1 = x, Color1, UIChangeSetting.ColorChangeSpeed);
         DOTween.To(() => uiscript.color2, x => uiscript.color2 = x, Color2, UIChangeSetting.ColorChangeSpeed);
     }
 }