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); } }
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); } }