少年修仙传客户端代码仓库
hch
2024-12-18 0cb75a653a646d4afc3b656985b9964efec93032
System/Skill/ScrollerController.cs
@@ -429,6 +429,24 @@
        return m_Scorller.GetCellSize(_dataIndex);
    }
    //滑动过去
    public void MoveToIndex(int index, float _time, EnhancedScroller.TweenType _tweenType)
    {
        if (!inited)
        {
            cacheJump = index;
            return;
        }
        if ((index < 0 || index >= _data.Count) && !m_Scorller.Loop)
        {
            return;
        }
        var _size = m_Scorller.GetScrollPositionForDataIndex(index, EnhancedScroller.CellViewPositionEnum.Before);
        m_Scorller.Tween(_tweenType, _time, _size);
    }
    public void JumpIndex(float _delta, float _time, EnhancedScroller.TweenType _tweenType)
    {
        if (!inited)