Advertisement
apieceoffruit

BounceAndChangeColor

May 20th, 2021 (edited)
1,566
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.53 KB | None | 0 0
  1.     public class Animations
  2.     {
  3.         public static Sequence BounceAndChangeColor(Transform obj, IColorable colorable, Color color)
  4.         {
  5.             var seq = DOTween.Sequence();
  6.             seq.Append(obj.DOScaleY(0.8f, 0.2f));
  7.             seq.Insert(0.425f,obj.DOScaleY(0.9f, 0.2f));
  8.             seq.Insert(0.05f,obj.DOPunchRotation(new Vector3(0,8,0),.5f));
  9.             seq.Insert(0.2f,DOTween.To(()=>colorable.Color,x=>colorable.Color=x,color,0.15f).SetEase(Ease.OutFlash));
  10.             return seq;
  11.         }
  12.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement