少年修仙传客户端代码仓库
client_linchunjie
2019-04-10 beb1e13e7e18ff185aa0b51fce2b2ac8f78a5484
3335 缥缈仙域
2个文件已添加
3个文件已修改
116 ■■■■■ 已修改文件
Fight/Stage/Dungeon/AdventureStage.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HazyRegion/HazyAdventureHintWin.cs 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HazyRegion/HazyAdventureHintWin.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HazyRegion/HazyRegionModel.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/MainInterfaceWin.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/Dungeon/AdventureStage.cs
@@ -63,7 +63,8 @@
        GAMgr.Instance.ServerDie(m_Npc.ServerInstID);
        GAMgr.Instance.Release(m_Npc);
        WindowCenter.Instance.Open<LoadingWin>();
        WindowCenter.Instance.Open<LoadingWin>();
        WindowCenter.Instance.Close<MainInterfaceWin>();
        var _async = SceneManager.UnloadSceneAsync("Map000_Xsdt");
        yield return _async;
        if (!AssetSource.sceneFromEditor)
@@ -76,8 +77,9 @@
            _hero.Pos = m_CacheHeroPos;
        }
        CameraController.Instance.Apply();
        yield return null;
        WindowCenter.Instance.Close<LoadingWin>();
        yield return null;
        WindowCenter.Instance.Open<MainInterfaceWin>();
        WindowCenter.Instance.Close<LoadingWin>();
        if (onExitAdventureStage != null)
        {
System/HazyRegion/HazyAdventureHintWin.cs
New file
@@ -0,0 +1,84 @@
//--------------------------------------------------------
//    [Author]:           第二世界
//    [  Date ]:           Wednesday, April 10, 2019
//--------------------------------------------------------
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace Snxxz.UI
{
    public class HazyAdventureHintWin : Window
    {
        [SerializeField] Text m_AdventureName;
        [SerializeField] Text m_Progress;
        HazyRegionModel model { get { return ModelCenter.Instance.GetModel<HazyRegionModel>(); } }
        #region Built-in
        protected override void BindController()
        {
        }
        protected override void AddListeners()
        {
        }
        protected override void OnPreOpen()
        {
            model.onHazyRegionIncidentRefresh += OnHazyRegionIncidentRefresh;
            Display();
        }
        protected override void OnAfterOpen()
        {
        }
        protected override void OnPreClose()
        {
            model.onHazyRegionIncidentRefresh -= OnHazyRegionIncidentRefresh;
        }
        protected override void OnAfterClose()
        {
        }
        #endregion
        void Display()
        {
            var config = AdventureDialogueConfig.Get(model.adventureDialogueId);
            if (config != null)
            {
                var npcConfig = NPCConfig.Get(config.npcId);
                m_AdventureName.text = string.Format("与{0}对话:", npcConfig.charName);
            }
            HazyRegionModel.Incident incident;
            var completed = false;
            if (model.TryGetIncident(model.processingIncidentId, out incident))
            {
                completed = incident.state == HazyRegionModel.IncidentState.Complete;
            }
            m_Progress.text = StringUtility.Contact(completed ? 1 : 0, "/", 1);
        }
        private void OnHazyRegionIncidentRefresh()
        {
            Display();
        }
    }
}
System/HazyRegion/HazyAdventureHintWin.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 1420ea56c96d7a142a0b5037cc30f7cb
timeCreated: 1554878168
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/HazyRegion/HazyRegionModel.cs
@@ -48,6 +48,7 @@
            ParseConfig();
            StageLoad.Instance.onStageLoadFinish += OnStageLoadFinish;
            AdventureStage.Instance.onLoadAdventureStage += OnLoadAdventureStage;
            AdventureStage.Instance.onExitAdventureStage += OnExitAdventureStage;
        }
@@ -69,11 +70,18 @@
        {
            StageLoad.Instance.onStageLoadFinish -= OnStageLoadFinish;
            AdventureStage.Instance.onExitAdventureStage -= OnExitAdventureStage;
            AdventureStage.Instance.onLoadAdventureStage -= OnLoadAdventureStage;
        }
        private void OnLoadAdventureStage()
        {
            WindowCenter.Instance.Open<HazyAdventureHintWin>();
        }
        private void OnExitAdventureStage()
        {
            SnxxzGame.Instance.StartCoroutine(Co_TryOpenHazyRegionWin());
            WindowCenter.Instance.Close<HazyAdventureHintWin>();
        }
        private void OnStageLoadFinish()
System/MainInterfacePanel/MainInterfaceWin.cs
@@ -615,6 +615,10 @@
        private bool IsDungeon()
        {
            if (AdventureStage.Instance.IsInAdventureStage)
            {
                return true;
            }
            var mapId = PlayerDatas.Instance.baseData.MapID;
            var mapConfig = MapConfig.Get(mapId);
            return mapConfig != null && mapConfig.MapFBType != 0;