少年修仙传客户端代码仓库
client_linchunjie
2019-03-20 0a667c3c3f030093f7cb6e6c8fee637cfa2c41c3
6340  【前端】【2.0】境界改版开发单(优化表现)
4个文件已修改
149 ■■■■■ 已修改文件
Core/Camera/CameraController.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmAnimationBehaviour.cs 118 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmLevelUpBehaviour.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmTransitionWin.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/Camera/CameraController.cs
@@ -103,6 +103,16 @@
        }
    }
    public void PlayAnimationClipUnLimit(string name)
    {
        AnimationClip _clip = BuiltInLoader.LoadAnimationClip(name);
        if (_clip != null)
        {
            m_Animation.AddClip(_clip, "start_show");
            m_Animation.Play("start_show");
        }
    }
    private void OnAnimationOver()
    {
        IsPlayingAnim = false;
System/Realm/RealmAnimationBehaviour.cs
@@ -123,6 +123,8 @@
                }
            }
            m_EffectBoss.StopImediatly();
            StartLine(index);
            
            m_EffectLevelUp.StopImediatly();
@@ -145,19 +147,6 @@
                yield return WaitingForSecondConst.GetWaitForSeconds(effectTime);
            }
            if (index != -1)
            {
                m_EffectLines[index].Play();
                var animator = m_EffectLines[index].target.GetAnimator();
                animator.Play("open", 0, 0);
                yield return WaitingForSecondConst.WaitMS500;
                animator.Play("idle", 0);
            }
            var realmStage = GetRealmStageBeha(index + 1);
            if (realmStage != null)
            {
                realmStage.DisplayEffect(true);
            }
            yield return WaitingForSecondConst.WaitMS500;
            if (index == 3 && model.displayRealmLevel < model.realmMaxLevel)
@@ -192,6 +181,29 @@
            return null;
        }
        void StartLine(int index)
        {
            if (index != -1)
            {
                StartCoroutine(Co_StartLine(index));
            }
        }
        IEnumerator Co_StartLine(int index)
        {
            m_EffectLines[index].Play();
            var animator = m_EffectLines[index].target.GetAnimator();
            animator.Play("open", 0, 0);
            yield return WaitingForSecondConst.WaitMS500;
            animator.Play("idle", 0);
            var realmStage = GetRealmStageBeha(index + 1);
            if (realmStage != null)
            {
                realmStage.DisplayEffect(true);
            }
        }
        void StartRotate()
        {
            rotating = true;
@@ -200,46 +212,6 @@
                StopCoroutine(m_RotateCoroutine);
            }
            m_RotateCoroutine = StartCoroutine(Co_Rotate());
        }
        public void StartBossEffectShow()
        {
            StartCoroutine(Co_BossEffectShow());
        }
        IEnumerator Co_BossEffectShow()
        {
            isPlayingBossEffect = true;
            m_EffectBoss.Play();
            m_EffectBossWord.Play();
            Animator animator = null;
            if (m_EffectBoss.target != null)
            {
                animator = m_EffectBoss.target.GetAnimator();
                animator.Play("Effect_JingJieBJ_02", 0, 0);
            }
            if (m_EffectBase.target != null)
            {
                var obj = m_EffectBase.target.transform.Find("GameObject/b/b (3)");
                if (obj != null)
                {
                    obj.gameObject.SetActive(false);
                }
            }
            yield return WaitingForSecondConst.GetWaitForSeconds(m_CoverDisappearTime);
            if (m_EffectCover.IsPlaying)
            {
                m_EffectCover.StopImediatly();
            }
            yield return WaitingForSecondConst.GetWaitForSeconds(2f - m_CoverDisappearTime);
            isPlayingBossEffect = false;
            if (onBossAppearComplete != null)
            {
                onBossAppearComplete();
            }
        }
        IEnumerator Co_Rotate()
@@ -308,6 +280,46 @@
            }
        }
        public void StartBossEffectShow()
        {
            StartCoroutine(Co_BossEffectShow());
        }
        IEnumerator Co_BossEffectShow()
        {
            isPlayingBossEffect = true;
            m_EffectBoss.Play();
            m_EffectBossWord.Play();
            Animator animator = null;
            if (m_EffectBoss.target != null)
            {
                animator = m_EffectBoss.target.GetAnimator();
                animator.Play("Effect_JingJieBJ_02", 0, 0);
            }
            if (m_EffectBase.target != null)
            {
                var obj = m_EffectBase.target.transform.Find("GameObject/b/b (3)");
                if (obj != null)
                {
                    obj.gameObject.SetActive(false);
                }
            }
            yield return WaitingForSecondConst.GetWaitForSeconds(m_CoverDisappearTime);
            if (m_EffectCover.IsPlaying)
            {
                m_EffectCover.StopImediatly();
            }
            yield return WaitingForSecondConst.GetWaitForSeconds(2f - m_CoverDisappearTime);
            isPlayingBossEffect = false;
            if (onBossAppearComplete != null)
            {
                onBossAppearComplete();
            }
        }
        public void Dispose()
        {
            rotating = false;
System/Realm/RealmLevelUpBehaviour.cs
@@ -91,7 +91,8 @@
                    SysNotifyMgr.Instance.ShowTip("RealmLevelUpError_2");
                    break;
                case 3:
                    SysNotifyMgr.Instance.ShowTip("RealmLevelUpError_3");
                    var config = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel);
                    ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(config.NeedGood);
                    break;
            }
        }
System/Realm/RealmTransitionWin.cs
@@ -17,7 +17,7 @@
        [SerializeField] UIAlphaTween m_AlphaTween;
        [SerializeField] Transform m_ContainerProgress;
        [SerializeField] Image m_Progress;
        [SerializeField, Header("进入时间"), Range(0.1f, 5f)] float m_Duration = 1f;
        [SerializeField, Header("进度时长")] float m_Duration = 0.8f;
        float timer = 0f;
        #region Built-in
@@ -41,7 +41,11 @@
        protected override void OnActived()
        {
            base.OnActived();
            StartCoroutine(Co_Enter());
            if (!CameraController.Instance.IsPlayingAnim)
            {
                CameraController.Instance.PlayAnimationClipUnLimit("RealmFuncOpen");
            }
            m_AlphaTween.Play(OnTweenComplete);
        }
        protected override void OnAfterOpen()
@@ -51,7 +55,6 @@
        protected override void OnPreClose()
        {
            WindowCenter.Instance.windowBeforeOpenEvent -= WindowBeforeOpenEvent;
            StopAllCoroutines();
        }
        protected override void OnAfterClose()
@@ -61,7 +64,7 @@
        protected override void LateUpdate()
        {
            base.LateUpdate();
            if (m_Progress.fillAmount <= m_Duration)
            if (m_Progress.fillAmount <= 1f)
            {
                var progress = Mathf.Clamp01(timer / m_Duration);
                m_Progress.fillAmount = progress;
@@ -69,13 +72,6 @@
            timer += Time.deltaTime;
        }
        #endregion
        IEnumerator Co_Enter()
        {
            yield return WaitingForSecondConst.GetWaitForSeconds(m_Duration);
            CameraController.Instance.PlayAnimationClip("RealmFuncOpen");
            m_AlphaTween.Play(OnTweenComplete);
        }
        private void WindowBeforeOpenEvent(Window window)
        {