| | |
| | | [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;
|
| | |
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent += PlayerDataRefreshInfoEvent;
|
| | | WindowCenter.Instance.windowAfterCloseEvent += WindowAfterCloseEvent;
|
| | | cacheRealmPoint = PlayerDatas.Instance.extersion.realmPoint;
|
| | | m_RawBoss.gameObject.SetActive(false);
|
| | | m_RawPlayer.gameObject.SetActive(false);
|
| | | Display();
|
| | | }
|
| | |
|
| | |
| | | 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);
|
| | | }
|
| | | }
|
| | |
| | | StopCoroutine(cacheCoroutine);
|
| | | cacheCoroutine = null;
|
| | | }
|
| | | if (cacheController != null)
|
| | | {
|
| | | cacheController = null;
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | |
| | | 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);
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | if (refreshType == PlayerDataRefresh.OfficialRank)
|
| | | {
|
| | | StopBoss();
|
| | | DisplayRealmNow();
|
| | | DisplayRealmNext();
|
| | | DisplayModel();
|
| | |
| | | {
|
| | | m_RawBoss.gameObject.SetActive(true);
|
| | | m_RawPlayer.gameObject.SetActive(false);
|
| | | ResetRunTimeController();
|
| | | UI3DModelExhibition.Instance.StopShowPlayer();
|
| | | StartBoss(config);
|
| | | }
|
| | |
| | |
|
| | | 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)
|
| | |
| | | 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);
|