少年修仙传客户端代码仓库
client_linchunjie
2019-03-19 4242cab9cfa034299035dbdba67e277455b42fad
6340  【前端】【2.0】境界改版开发单(优化特效表现)
3个文件已修改
116 ■■■■■ 已修改文件
System/Realm/RealmAnimationBehaviour.cs 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmModel.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmWin.cs 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmAnimationBehaviour.cs
@@ -147,31 +147,10 @@
                StartRotate();
            }
            config = RealmConfig.Get(model.displayRealmLevel);
            if (config.BossID != 0)
            if (model.SatisfyChallengeBoss(model.displayRealmLevel))
            {
                m_EffectBoss.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_BossEffectTime);
                if (onBossAppearComplete != null)
                {
                    onBossAppearComplete();
                }
                StartBossEffectShow();
                model.SetBossEffectShow(model.displayRealmLevel);
                yield return WaitingForSecondConst.GetWaitForSeconds(Mathf.Max(0f, 3.1f - m_BossEffectTime));
            }
@@ -205,15 +184,34 @@
            m_RotateCoroutine = StartCoroutine(Co_Rotate());
        }
        public void Dispose()
        public void StartBossEffectShow()
        {
            rotating = false;
            isPlayingAnimation = false;
            StopAllCoroutines();
            if (m_RotateCoroutine != null)
            StartCoroutine(Co_BossEffectShow());
        }
        IEnumerator Co_BossEffectShow()
        {
            m_EffectBoss.Play();
            Animator animator = null;
            if (m_EffectBoss.target != null)
            {
                StopCoroutine(m_RotateCoroutine);
                m_RotateCoroutine = 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_BossEffectTime);
            if (onBossAppearComplete != null)
            {
                onBossAppearComplete();
            }
        }
@@ -283,6 +281,18 @@
            }
        }
        public void Dispose()
        {
            rotating = false;
            isPlayingAnimation = false;
            StopAllCoroutines();
            if (m_RotateCoroutine != null)
            {
                StopCoroutine(m_RotateCoroutine);
                m_RotateCoroutine = null;
            }
        }
        [ContextMenu("Reset")]
        void TestReset()
        {
System/Realm/RealmModel.cs
@@ -283,6 +283,28 @@
            return 7039;
        }
        public bool GetBossEffectShow(int realmLevel)
        {
            var playerId = PlayerDatas.Instance.baseData.PlayerID;
            return LocalSave.GetBool(StringUtility.Contact("RealmBossEffect_", realmLevel, "_", playerId));
        }
        public void SetBossEffectShow(int realmLevel)
        {
            var playerId = PlayerDatas.Instance.baseData.PlayerID;
            LocalSave.SetBool(StringUtility.Contact("RealmBossEffect_", realmLevel, "_", playerId), true);
        }
        public bool SatisfyChallengeBoss(int reamLevel)
        {
            var config = RealmConfig.Get(reamLevel);
            if (config != null)
            {
                return config.BossID != 0 && !isBossPass && PlayerDatas.Instance.baseData.LV >= config.NeedLV;
            }
            return false;
        }
        public void SendLevelUpRealm()
        {
            CA523_tagCMRealmLVUp pak = new CA523_tagCMRealmLVUp();
System/Realm/RealmWin.cs
@@ -171,7 +171,20 @@
            DisplayRealmBrief();
            DisplayUnlockEquip();
            DisplayCover();
            DisplayEffectBoss();
            if (model.SatisfyChallengeBoss(model.selectRealm - 1))
            {
                if (model.GetBossEffectShow(model.selectRealm - 1))
                {
                    DisplayEffectBoss();
                }
                else
                {
                    m_RealmAnimation.StartBossEffectShow();
                    m_GotoBoss.gameObject.SetActive(false);
                    model.SetBossEffectShow(model.selectRealm - 1);
                }
            }
        }
        void HideRealmUp()
@@ -230,10 +243,7 @@
                m_RealmLevelUp.Display(model.selectRealm);
            }
            var config = RealmConfig.Get(model.selectRealm - 1);
            m_GotoBoss.gameObject.SetActive(!model.isBossPass
                && model.selectRealm == model.displayRealmLevel + 1
                && config != null && config.BossID != 0);
            m_GotoBoss.gameObject.SetActive(model.SatisfyChallengeBoss(model.selectRealm - 1));
        }
        void DisplayRealmBrief()
@@ -287,7 +297,7 @@
            else
            {
                var config = RealmConfig.Get(model.displayRealmLevel);
                var isBossExist = config != null && config.BossID != 0 && !model.isBossPass;
                var isBossExist = model.SatisfyChallengeBoss(model.displayRealmLevel);
                if (isBossExist)
                {
                    return;