少年修仙传客户端代码仓库
client_linchunjie
2018-10-26 fcb50d2249d9b1ef41d2929db4bed6ce3c6db5ee
3335 【1.2】法宝选择界面的特效同步
2个文件已修改
20 ■■■■■ 已修改文件
System/Treasure/TreasureComponent.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/UI3DTreasureSelectStage.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureComponent.cs
@@ -728,7 +728,7 @@
                    var animator = highestSfx.GetComponentInChildren<Animator>(true);
                    if (animator != null)
                    {
                        animator.Play(HUMAN_HIGHEST_STAGE_1, 0, 0);
                        animator.Play(HUMAN_HIGHEST_STAGE_1, 0, UI3DTreasureSelectStage.sync_normalizedTime);
                    }
                    highestSfx.duration = 0;
                    LayerUtility.SetLayer(highestSfx.gameObject, LayerUtility.UILayer, true);
System/Treasure/UI3DTreasureSelectStage.cs
@@ -220,6 +220,10 @@
        private Dictionary<TreasureCategory, bool> m_PreloadDict = new Dictionary<TreasureCategory, bool>();
        Coroutine preloadCoroutine = null;
        public static float sync_normalizedTime = 0f;
        const float effect_duration = 4f;
        float sync_timer = 0f;
        private void InitTreasure()
        {
            Load(TreasureCategory.Human);
@@ -752,6 +756,7 @@
        private void LateUpdate()
        {
            Tick();
            if (!IsOpen || Preloading)
            {
                return;
@@ -788,6 +793,19 @@
            }
        }
        private void Tick()
        {
            sync_normalizedTime = Mathf.Clamp01(sync_timer / effect_duration);
            if (sync_timer >= effect_duration)
            {
                sync_timer = 0f;
            }
            else
            {
                sync_timer += Time.deltaTime;
            }
        }
        #region 滑动
        private void CheckDisplay()
        {