Пример #1
0
 public Spin(float time, Action onEnd = null) : base(time, (float p) => {
     Rect.SetLocalEulerAnglesZ(curve.Get(p) * 360f);
 }, onEnd) {}
Пример #2
0
 public Slide(float time, float to, Action onEnd = null) : base(time, (float p) => {
     Rect.SetAnchoredPositionX(Mathf.Lerp(0f, to, curve.Get(p)));
 }, onEnd) {}
Пример #3
0
 public Bump(float time, float amount, Action onEnd = null) : base(time, (float p) => {
     Rect.SetLocalScale(Mathf.Lerp(1f, amount, Mathf.Sin(Mathf.PI * curve.Get(p))));
 }, onEnd) {}
Пример #4
0
 public Peek(float time, float to, Action onEnd = null) : base(time, (float p) => {
     Rect.SetAnchoredPositionY(Mathf.Lerp(startPosition, to, curve.Get(p)));
 }, onEnd) {}
Пример #5
0
 public Move(float time, Vector3 target, Action onEnd = null) : base(time, (float p) => {
     Rect.SetLocalPosition(Vector3.Lerp(startPosition, target, curve.Get(p)));
 }, onEnd) {}