少年修仙传客户端代码仓库
client_Wu Xijin
2019-04-25 c49ec60e44c268494289b2435cca1e8e69f4e2b5
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
5个文件已修改
91 ■■■■ 已修改文件
System/Treasure/HumanTreasureTaskCell.cs 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/HumanTreasureWin.cs 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureChapterWin.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureCollectBriefInfoBehaviour.cs 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureModel.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/HumanTreasureTaskCell.cs
@@ -9,6 +9,7 @@
{
    public class HumanTreasureTaskCell : CellView
    {
        [SerializeField] UIEffect m_EffectAppear;
        [SerializeField] UIAlphaTween m_AlphaTween;
        [SerializeField] Text m_ClueName;
        [SerializeField] Transform m_ContainerCollected;
@@ -26,7 +27,12 @@
            m_Goto.AddListener(Goto);
        }
        public void Display(int clue, bool animationStep = false)
        private void OnDisable()
        {
            StopAllCoroutines();
        }
        public void Display(int clue, bool animationStep, float displayTime)
        {
            var config = TreasureConfig.Get(model.selectedTreasure);
            Dictionary<int, List<int>> clues;
@@ -79,17 +85,24 @@
            m_ContainerCutline.gameObject.SetActive(lastClue != clue);
            if (!animationStep)
            if (!animationStep || !gameObject.activeInHierarchy)
            {
                m_AlphaTween.SetEndState();
            }
            else
            {
                m_AlphaTween.SetStartState();
                m_AlphaTween.Play();
                StartCoroutine(Co_Display(displayTime));
            }
        }
        IEnumerator Co_Display(float time)
        {
            yield return WaitingForSecondConst.GetWaitForSeconds(time);
            m_EffectAppear.Play();
            m_AlphaTween.Play();
        }
        private void Goto()
        {
            WindowJumpMgr.Instance.ClearJumpData();
System/Treasure/HumanTreasureWin.cs
@@ -30,6 +30,7 @@
        [SerializeField] Text m_ChallengeCondition;
        [SerializeField] Slider m_TaskSlider;
        [SerializeField] Text m_TaskProgress;
        [SerializeField] UIEffect m_EffectInduction;
        [SerializeField] Transform m_ContainerSkillDetial;
        [SerializeField] Image m_SkillDetailIcon;
@@ -42,6 +43,8 @@
        [SerializeField] ScrollerController m_TaskController;
        bool animationStep = false;
        float displayTime = 0f;
        List<int> animationClues = new List<int>();
@@ -166,6 +169,8 @@
            animationClues.Clear();
            displayTime = 0f;
            m_TaskController.Refresh();
            Dictionary<int, List<int>> clues;
            if (model.TryGetTreasureClues(model.selectedTreasure, out clues))
@@ -209,6 +214,18 @@
            }
            m_TaskController.Restart();
            animationClues.Clear();
            if (taskAnimation)
            {
                Clock.AlarmAfter(Mathf.CeilToInt(displayTime + 0.6f), () =>
                {
                    m_TaskController.mScrollRect.enabled = true;
                });
            }
            else
            {
                m_TaskController.mScrollRect.enabled = true;
            }
        }
        void DisplayAnimation()
@@ -268,13 +285,15 @@
            {
                var count = m_TaskController.GetNumberOfCells(m_TaskController.m_Scorller);
                m_TaskController.JumpIndex(count - 1);
                m_EffectInduction.Play();
                m_TaskController.mScrollRect.enabled = false;
                StartCoroutine(Co_DelayShowTask());
            }
        }
        IEnumerator Co_DelayShowTask()
        {
            yield return WaitingForSecondConst.WaitMS1000;
            yield return WaitingForSecondConst.WaitMS3000;
            DisplayTasks(true);
        }
@@ -315,12 +334,14 @@
            if (type == ScrollerDataType.Header)
            {
                var taskCell = cell as HumanTreasureTaskCell;
                taskCell.transform.SetParent(m_TaskController.m_Scorller.LayoutGroup.transform);
                var animation = false;
                if (animationClues.Contains(cell.index))
                {
                    animation = true;
                    displayTime += 0.6f;
                }
                taskCell.Display(cell.index, animation);
                taskCell.Display(cell.index, animation, displayTime);
            }
        }
System/Treasure/TreasureChapterWin.cs
@@ -30,7 +30,7 @@
        FunctionUnlockFlyObject flyObject = null;
        public static bool displaying = false;
        public static int displayId = 0;
        TreasureModel model { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }
        TaskModel taskModel { get { return ModelCenter.Instance.GetModel<TaskModel>(); } }
@@ -47,8 +47,6 @@
        protected override void OnPreOpen()
        {
            displaying = true;
            if (flyObject != null)
            {
                Destroy(flyObject);
@@ -84,7 +82,7 @@
        protected override void OnPreClose()
        {
            displaying = false;
            model.treasureChapterId = 0;
        }
        protected override void OnAfterClose()
System/Treasure/TreasureCollectBriefInfoBehaviour.cs
@@ -49,6 +49,7 @@
        Coroutine m_CacheCoroutine = null;
        TreasureModel model { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }
        TaskModel taskModel { get { return ModelCenter.Instance.GetModel<TaskModel>(); } }
        public void Display()
        {
@@ -57,6 +58,7 @@
            model.treasureStateChangeEvent += TreasureStateChangeEvent;
            model.treasureCollectProgressRefresh += TreasureCollectProgressRefresh;
            WindowCenter.Instance.windowAfterOpenEvent += WindowAfterOpenEvent;
            WindowCenter.Instance.windowAfterCloseEvent += WindowBeforeCloseEvent;
            dirty = false;
            DisplayBase();
@@ -79,7 +81,10 @@
                    StopCoroutine(m_CacheCoroutine);
                    m_CacheCoroutine = null;
                }
                m_CacheCoroutine = StartCoroutine(Co_StopEffect());
                if (gameObject.activeInHierarchy)
                {
                    m_CacheCoroutine = StartCoroutine(Co_StopEffect());
                }
            }
        }
@@ -92,7 +97,7 @@
        void DisplayBase()
        {
            bool isChapterOpen = TreasureChapterWin.displaying;
            bool isChapterOpen = model.treasureChapterId != 0;
            m_ContainerUnknown.gameObject.SetActive(displayId == 0 || isChapterOpen);
            m_ContainerCollect.gameObject.SetActive(displayId != 0 && !isChapterOpen);
@@ -163,6 +168,26 @@
            return 0;
        }
        int GetLostTreasure()
        {
            var treasureIds = model.GetTreasureCategory(TreasureCategory.Human);
            var latestTask = taskModel.GetLatestMainTaskId();
            foreach (var id in treasureIds)
            {
                List<int> tasks;
                if (model.TryGetTreasureTasks(id, out tasks))
                {
                    if (latestTask < tasks[0])
                    {
                        return id;
                    }
                }
            }
            return 0;
        }
        bool IsAllCompleted()
        {
            var treasureIds = model.GetTreasureCategory(TreasureCategory.Human);
@@ -188,6 +213,14 @@
            }
        }
        private void WindowBeforeCloseEvent(Window window)
        {
            if (window is TreasureChapterWin)
            {
                DisplayBase();
            }
        }
        private void LateUpdate()
        {
            if (dirty)
@@ -202,6 +235,7 @@
            model.treasureStateChangeEvent -= TreasureStateChangeEvent;
            model.treasureCollectProgressRefresh -= TreasureCollectProgressRefresh;
            WindowCenter.Instance.windowAfterOpenEvent -= WindowAfterOpenEvent;
            WindowCenter.Instance.windowAfterCloseEvent -= WindowBeforeCloseEvent;
            if (m_CacheCoroutine != null)
            {
                StopCoroutine(m_CacheCoroutine);
System/Treasure/TreasureModel.cs
@@ -144,7 +144,7 @@
        public int exitRecord { get; set; }
        public int entranceOpenCondition { get; private set; }
        public int treasureChapterId { get; private set; }
        public int treasureChapterId { get; set; }
        TaskModel taskModel { get { return ModelCenter.Instance.GetModel<TaskModel>(); } }
@@ -1065,6 +1065,7 @@
                {
                    treasureChapterId = config.id;
                    PopupWindowsProcessor.Instance.Add("TreasureChapterWin");
                    break;
                }
            }
        }