Ejemplo n.º 1
0
 public Spin(float time, Action onEnd = null) : base(time, (float p) => {
     Rect.SetLocalEulerAnglesZ(curve.Get(p) * 360f);
 }, onEnd) {}
Ejemplo n.º 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) {}
Ejemplo n.º 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) {}
Ejemplo n.º 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) {}
Ejemplo n.º 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) {}