コード例 #1
0
        private void Tween5(int start, int end)
        {
            sequence = DOTween.Sequence();
            Vector3 move     = new Vector3(-0.5f, -0.3f, 0);
            float   duration = 0.2f;

            for (var i = start; i <= end; ++i)
            {
                var timeOffset   = Mathf.Lerp(0, 1, (i - start) / (float)(end - start + 1));
                var charSequence = DOTween.Sequence();
                charSequence.Append(_tweener.DOLocalMove(i, move, 0.5f).SetEase(Ease.InOutQuad))
                .Join(_tweener.DOFade(i, 0, duration * 2).From().SetEase(Ease.InOutCubic))
                .Join(_tweener.DOScale(i, 0, duration).From().SetEase(Ease.OutBack, 3))
                .Append(_tweener.DOLocalMove(i, Vector3.zero, duration).SetEase(Ease.InOutQuad));
                sequence.Insert(timeOffset, charSequence);
            }
        }