少年修仙传客户端代码仓库
client_Hale
2018-08-20 a313588fa0d7a791c0f6898af05225b86f455228
Merge remote-tracking branch 'origin/master' into Skill_Polymorph_BeatBackPlayer
1个文件已修改
29 ■■■■ 已修改文件
System/Realm/RealmUpWin.cs 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmUpWin.cs
@@ -55,6 +55,7 @@
        [SerializeField, Header("当前境界位置")] Vector3[] m_RealmNowPositions;
        [SerializeField, Header("下一境界位置")] Vector3[] m_RealmNextwPositions;
        [SerializeField, Header("Boss位置")] Vector3[] m_BossPositions;
        [SerializeField, Header("Boss出现延长")] float m_DelayEnterTime = 1f;
        int cacheRealmPoint = 0;
        Coroutine cacheCoroutine = null;
@@ -79,6 +80,8 @@
            PlayerDatas.Instance.PlayerDataRefreshInfoEvent += PlayerDataRefreshInfoEvent;
            WindowCenter.Instance.windowAfterCloseEvent += WindowAfterCloseEvent;
            cacheRealmPoint = PlayerDatas.Instance.extersion.realmPoint;
            m_RawBoss.gameObject.SetActive(false);
            m_RawPlayer.gameObject.SetActive(false);
            Display();
        }
@@ -87,9 +90,9 @@
            base.OnActived();
            if (realmModel.realmDungeonState)
            {
                m_RawPlayer.gameObject.SetActive(true);
                StopBoss();
                m_RawBoss.gameObject.SetActive(false);
                m_RawPlayer.gameObject.SetActive(true);
                UI3DModelExhibition.Instance.BeginShowSitDownPlayer(m_RawPlayer, PlayerDatas.Instance.baseData.Job);
            }
        }
@@ -124,6 +127,10 @@
                StopCoroutine(cacheCoroutine);
                cacheCoroutine = null;
            }
            if (cacheController != null)
            {
                cacheController = null;
            }
        }
        protected override void OnAfterClose()
@@ -142,10 +149,11 @@
        IEnumerator Co_DisplayBossShow()
        {
            yield return WaitingForSecondConst.WaitMS800;
            UI3DModelExhibition.Instance.StopShowPlayer();
            m_RawPlayer.gameObject.SetActive(false);
            m_RawBoss.gameObject.SetActive(true);
            ResetRunTimeController();
            var config = ConfigManager.Instance.GetTemplate<RealmConfig>(PlayerDatas.Instance.baseData.realmLevel);
            m_RawPlayer.gameObject.SetActive(false);
            UI3DModelExhibition.Instance.StopShowPlayer();
            yield return WaitingForSecondConst.GetWaitForSeconds(m_DelayEnterTime > 0 ? m_DelayEnterTime : 1f);
            StartBoss(config, true);
        }
@@ -153,7 +161,6 @@
        {
            if (refreshType == PlayerDataRefresh.OfficialRank)
            {
                StopBoss();
                DisplayRealmNow();
                DisplayRealmNext();
                DisplayModel();
@@ -273,6 +280,7 @@
            {
                m_RawBoss.gameObject.SetActive(true);
                m_RawPlayer.gameObject.SetActive(false);
                ResetRunTimeController();
                UI3DModelExhibition.Instance.StopShowPlayer();
                StartBoss(config);
            }
@@ -280,8 +288,14 @@
        private void StopBoss()
        {
            ResetRunTimeController();
            UI3DModelExhibition.Instance.StopShowNPC();
        }
        private void ResetRunTimeController()
        {
            var npcModel = UI3DModelExhibition.Instance.NpcModelPet;
            if (npcModel != null && m_RawBoss.gameObject.activeSelf)
            if (npcModel != null)
            {
                var animator = npcModel.GetComponentInChildren<Animator>();
                if (animator != null && cacheController != null)
@@ -289,11 +303,12 @@
                    animator.runtimeAnimatorController = cacheController;
                }
            }
            UI3DModelExhibition.Instance.StopShowNPC();
        }
        private void StartBoss(RealmConfig config, bool act = false)
        {
            StopBoss();
            m_RawBoss.gameObject.SetActive(true);
            UI3DModelExhibition.Instance.StopShowPlayer();
            UI3DModelExhibition.Instance.BeginShowNPC(config.BossID, config.IsBigRealm == 1 ? Vector3.zero : direction, m_RawBoss, false);
            var npcConfig = ConfigManager.Instance.GetTemplate<NPCConfig>(config.BossID);