Unity doTween Text 动画滚动

  void InvkoeFun() {
        _widthText = cueText.GetComponent<RectTransform>().rect.width;
        _dirtion = cueText.transform.position.x - (_widthText - _widthMask)-50;
        float _time = (_widthText - _widthMask) / 50;
        if (_widthText > _widthMask)
        {
            cueText.transform.DOMoveX(_dirtion, _time).SetLoops(-1, LoopType.Restart);
        }
    }

 

posted on 2024-07-15 14:34  zqiang0803  阅读(21)  评论(0编辑  收藏  举报

导航