少年修仙传客户端代码仓库
6680 子 【2.0】【开发】五行专精激活方式变更 / 【2.0】【前端】五行专精激活方式变更
1个文件已修改
31 ■■■■ 已修改文件
System/Skill/ExpertSkillSelectWin.cs 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Skill/ExpertSkillSelectWin.cs
@@ -137,7 +137,7 @@
            }
        }
        void DisplayDetail()
        void DisplayDetail(bool animationStep = false)
        {
            if (selectExpert != 0)
            {
@@ -168,19 +168,42 @@
                    }
                }
                //m_LayoutElement.preferredHeight = datas.Count > 2 ? 440 : 302;
                if (!animationStep)
                {
                    m_LayoutElement.preferredHeight = datas.Count > 2 ? 440 : 302;
                }
                m_CyclicScroll.enabled = true;
                m_CyclicScroll.Dispose();
                m_CyclicScroll.Init(datas);
                StartCoroutine(Co_Arrange());
                StartCoroutine(Co_Arrange(animationStep));
            }
        }
        IEnumerator Co_Arrange()
        IEnumerator Co_Arrange(bool animationStep)
        {
            yield return null;
            if (animationStep)
            {
                var start = m_LayoutElement.preferredHeight;
                var intValue = (int)start;
                if (start > 302)
                {
                    while (start > 302)
                    {
                        start -= Time.deltaTime * 10;
                        start = Mathf.Max(302, start);
                        m_LayoutElement.preferredHeight = start;
                        if (intValue != (int)start)
                        {
                            intValue = (int)start;
                            m_CyclicScroll.ReArrange();
                        }
                    }
                    yield break;
                }
            }
            m_CyclicScroll.ReArrange();
        }