Example #1
0
        //
        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;
        }
Example #2
0
        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);
            }
        }
Example #3
0
 private void RunPartTwoMoveTween(float duration)
 {
     MoveToTween.Run(gameObject, FinishPoint, duration).SetLocal(true).SetEase(Ease).OnFinish(() => RunPartOneMoveTween(Duration));
 }