dotween曲线针对不同的组件,提供了不同的函数,要使用想要的dotween函数,需要先知道哪些组件有这个函数
在transform下有 抖动DOShakePosition 函数,
public static Tweener DOShakePosition(this Transform target, float duration, float strength = 1, int vibrato = 10, float randomness = 90, bool snapping = false, bool fadeOut = true);
// 摘要:
// Shakes a Transform's localPosition with the given values.
//
// 参数:
// duration:
// The duration of the tween
//
// strength:
// The shake strength
//
// vibrato:
// Indicates how much will the shake vibrate
//
// randomness:
// Indicates how much the shake will be random (0 to 180 - values higher than 90
// kind of suck, so beware). Setting it to 0 will shake along a single direction