// public IMoveTo InitMoveTo(Vector3 position, float time) { if (m_destroyed) return MoveToTween.DefaultSetup; Stop(Type.MoveTo); MoveToTween tween = new MoveToTween(m_target, position, time); m_tweens[(int)Type.MoveTo] = tween; return tween; }
public override void Run(GameObject target, TweenActionSettings s) { int example = Random.Range(0, 2); if (example == 0) { MoveToTween.Run(target, GetRandomScreenPoint(), s.Duration).SetLocal(true).SetDelay(s.Delay).SetEase(s.Ease); } else if (example == 1) { MoveToTween.RunX(target, GetRandomScreenPoint().x, s.Duration).SetLocal(true).SetDelay(s.Delay).SetEase(s.Ease); } }
private void RunPartTwoMoveTween(float duration) { MoveToTween.Run(gameObject, FinishPoint, duration).SetLocal(true).SetEase(Ease).OnFinish(() => RunPartOneMoveTween(Duration)); }