| | |
| | | |
| | | private IEnumerator _Enter() |
| | | { |
| | | WindowCenter.Instance.Open<LoadingWin>(); |
| | | WindowCenter.Instance.Open<LoadingWin>();
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>(); |
| | | if (!AssetSource.sceneFromEditor) |
| | | { |
| | | AssetBundleUtility.Instance.Sync_LoadAll("maps/map000_xsdt"); |
| | | AssetBundleUtility.Instance.Sync_LoadAll("maps/map140_qy"); |
| | | } |
| | | var _async = SceneManager.LoadSceneAsync("Map000_Xsdt", LoadSceneMode.Additive); |
| | | var _async = SceneManager.LoadSceneAsync("Map140_Qy", LoadSceneMode.Additive); |
| | | yield return _async; |
| | | var _hero = PlayerDatas.Instance.hero; |
| | | if (_hero != null) |
| | | { |
| | | _hero.Pos = new Vector3(188.49f, 62.512f, 23.85f); |
| | | _hero.Pos = new Vector3(9.517f, 18.742f, 7.485f); |
| | | } |
| | | CameraController.Instance.Apply(); |
| | | yield return null; |
| | | WindowCenter.Instance.Close<LoadingWin>(); |
| | | m_Npc = GAMgr.Instance.ReqClntNoFightNpc<GA_NpcClientFunc>((uint)hazyRegionModel.GetAdventureNpcId(), E_ActorGroup.FuncNpc); |
| | | m_Npc.Pos = new Vector3(189.101f, 62.47324f, 26.147f); |
| | | NPCInteractProcessor.s_NpcInteractEvent -= OnNpcTalkEvent; |
| | | NPCInteractProcessor.s_NpcInteractEvent += OnNpcTalkEvent; |
| | | WindowCenter.Instance.Close<LoadingWin>();
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | BossShowModel.Instance.bossShowCompletedEvent -= BossShowCompletedEvent; |
| | | BossShowModel.Instance.bossShowCompletedEvent += BossShowCompletedEvent; |
| | | |
| | | if (onLoadAdventureStage != null)
|
| | | {
|
| | | onLoadAdventureStage();
|
| | | } |
| | | } |
| | | |
| | | }
|
| | |
|
| | | private void BossShowCompletedEvent()
|
| | | {
|
| | | m_Npc = GAMgr.Instance.ReqClntNoFightNpc<GA_NpcClientFunc>((uint)hazyRegionModel.GetAdventureNpcId(), E_ActorGroup.FuncNpc); |
| | | m_Npc.Pos = new Vector3(9.012f, 18.76f, 9.089f); |
| | | NPCInteractProcessor.s_NpcInteractEvent -= OnNpcTalkEvent; |
| | | NPCInteractProcessor.s_NpcInteractEvent += OnNpcTalkEvent;
|
| | | }
|
| | |
|
| | | private IEnumerator _Exit() |
| | | { |
| | | NPCInteractProcessor.s_NpcInteractEvent -= OnNpcTalkEvent; |
| | | NPCInteractProcessor.s_NpcInteractEvent -= OnNpcTalkEvent;
|
| | | BossShowModel.Instance.bossShowCompletedEvent -= BossShowCompletedEvent; |
| | | GAMgr.Instance.ServerDie(m_Npc.ServerInstID); |
| | | GAMgr.Instance.Release(m_Npc); |
| | | |
| | | WindowCenter.Instance.Open<LoadingWin>();
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>(); |
| | | var _async = SceneManager.UnloadSceneAsync("Map000_Xsdt"); |
| | | var _async = SceneManager.UnloadSceneAsync("Map140_Qy"); |
| | | yield return _async; |
| | | if (!AssetSource.sceneFromEditor) |
| | | { |
| | | AssetBundleUtility.Instance.UnloadAssetBundle("maps/map000_xsdt", true, false); |
| | | AssetBundleUtility.Instance.UnloadAssetBundle("maps/map140_qy", true, false); |
| | | } |
| | | var _hero = PlayerDatas.Instance.hero; |
| | | if (_hero != null) |