Example #1
0
 public static void DOPunchRotation(this RectTransform item,
                                    PunchAnimationConfig config, PunchAnimationData data)
 {
     if (config.Duration > Mathf.Epsilon)
     {
         item.DOComplete();
         item.localRotation = Quaternion.Euler(data.StartValue);
         item.DOPunchRotation(config.Strength, config.Duration, config.Vibrato);
     }
 }
Example #2
0
 public static void DOPunchScale(this RectTransform item,
                                 PunchAnimationConfig config, PunchAnimationData data)
 {
     if (config.Duration > Mathf.Epsilon)
     {
         item.DOComplete();
         item.localScale = data.StartValue;
         item.DOPunchScale(config.Strength, config.Duration, config.Vibrato);
     }
 }