少年修仙传客户端代码仓库
client_linchunjie
2018-08-30 437ddf790dbb6e2027be870de1e4e682b008b662
Merge branch '2998仙盟宴会界面修改和逻辑修改'

Conflicts:
System/WindowBase/WindowCenter.cs
3个文件已修改
4个文件已添加
201 ■■■■■ 已修改文件
System/Dungeon/DungeonData.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/DungeonFairyFeastHintWin.cs 136 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/DungeonFairyFeastHintWin.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/DungeonModel.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FairyAu/FairyFeastRankBehaviour.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FairyAu/FairyFeastRankBehaviour.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/WindowBase/WindowCenter.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/DungeonData.cs
@@ -104,6 +104,8 @@
        public int topScore;
        public int isFullExp;
        public int leaderID;
        public FairyFeastRank[] familyPartyRank;
        public FairyFeastTop familyPartyTop;
        public long totalExp
        {
@@ -142,6 +144,19 @@
        }
    }
    public struct FairyFeastRank
    {
        public int rank;
        public string name;
        public int cnt;
    }
    public struct FairyFeastTop
    {
        public string name;
        public int cnt;
    }
    public struct ServerItem
    {
        public int ItemID;
System/Dungeon/DungeonFairyFeastHintWin.cs
New file
@@ -0,0 +1,136 @@
//--------------------------------------------------------
//    [Author]:           第二世界
//    [  Date ]:           Wednesday, August 29, 2018
//--------------------------------------------------------
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace Snxxz.UI
{
    public class DungeonFairyFeastHintWin : Window
    {
        [SerializeField] Button m_FairyFeast;
        [SerializeField] Text m_FairyFeastBtnTxt;
        [SerializeField] Button m_QuestionRank;
        [SerializeField] Text m_QuestionRankBtnTxt;
        [SerializeField] DungeonTargetBehaviour m_TargetBehaviour;
        [SerializeField] RectTransform m_ContainerRank;
        [SerializeField] FairyFeastRankBehaviour[] m_RankBehaviours;
        [SerializeField] FairyFeastRankBehaviour m_TopRank;
        [SerializeField] DungeonMultipleTaskWin.SelectEffect m_SelectEffect;
        DungeonModel model { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
        int currentSelect = 0;
        #region Built-in
        protected override void BindController()
        {
            m_FairyFeast.onClick.AddListener(() =>
            {
                Select(0);
            });
            m_QuestionRank.onClick.AddListener(() =>
            {
                Select(1);
            });
        }
        protected override void AddListeners()
        {
        }
        protected override void OnPreOpen()
        {
            Select(0);
            model.updateMissionEvent += UpdateMissionEvent;
        }
        protected override void OnAfterOpen()
        {
        }
        protected override void OnPreClose()
        {
            model.updateMissionEvent -= UpdateMissionEvent;
        }
        protected override void OnAfterClose()
        {
        }
        #endregion
        private void Select(int _index)
        {
            var _color = m_FairyFeast.targetGraphic.color;
            _color.a = _index == 1 ? m_SelectEffect.unselectAlpha : m_SelectEffect.selectAlpha;
            m_FairyFeast.targetGraphic.color = _color;
            m_FairyFeastBtnTxt.color = _index == 1 ? m_SelectEffect.unSelectTextColor : m_SelectEffect.selectTextColor;
            _color = m_QuestionRank.targetGraphic.color;
            _color.a = _index == 0 ? m_SelectEffect.unselectAlpha : m_SelectEffect.selectAlpha;
            m_QuestionRank.targetGraphic.color = _color;
            m_QuestionRankBtnTxt.color = _index == 0 ? m_SelectEffect.unSelectTextColor : m_SelectEffect.selectTextColor;
            m_TargetBehaviour.gameObject.SetActive(_index == 0);
            m_ContainerRank.gameObject.SetActive(_index == 1);
            currentSelect = _index;
            if (_index == 0)
            {
                m_TargetBehaviour.Init(31230);
            }
            else
            {
                DisplayRank();
            }
        }
        private void UpdateMissionEvent()
        {
            if (currentSelect == 1)
            {
                DisplayRank();
            }
        }
        void DisplayRank()
        {
            var index = 0;
            if (model.mission.familyPartyRank != null && model.mission.familyPartyRank.Length > 0)
            {
                List<FairyFeastRank> list = new List<FairyFeastRank>(model.mission.familyPartyRank);
                list.Sort(Compare);
                for (int i = 0; i < m_RankBehaviours.Length; i++)
                {
                    if (i < list.Count)
                    {
                        var data = list[i];
                        m_RankBehaviours[i].Display(UIHelper.ServerStringTrim(data.name), data.cnt);
                        index++;
                    }
                }
            }
            for (int i = index; i < m_RankBehaviours.Length; i++)
            {
                m_RankBehaviours[i].Display(Language.Get("CeremoneyOutOfPrint"), 0);
            }
            var topName = model.mission.familyPartyTop.name;
            m_TopRank.Display(string.IsNullOrEmpty(topName) ?
                Language.Get("CeremoneyOutOfPrint") : topName, string.IsNullOrEmpty(topName) ? 0 : model.mission.familyPartyTop.cnt);
        }
        int Compare(FairyFeastRank x, FairyFeastRank y)
        {
            return x.rank.CompareTo(y.rank);
        }
    }
}
System/Dungeon/DungeonFairyFeastHintWin.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: d28c93c41cd0c014e8ef4ddbc20a38c0
timeCreated: 1535531269
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/Dungeon/DungeonModel.cs
@@ -849,9 +849,9 @@
                            WindowCenter.Instance.Open<DungeonMissionHintWin>();
                        }
                        if (!WindowCenter.Instance.CheckOpen<DungeonMissionDetailsWin>())
                        if (!WindowCenter.Instance.CheckOpen<DungeonFairyFeastHintWin>())
                        {
                            WindowCenter.Instance.Open<DungeonMissionDetailsWin>();
                            WindowCenter.Instance.Open<DungeonFairyFeastHintWin>();
                        }
                    }
                    break;
System/FairyAu/FairyFeastRankBehaviour.cs
New file
@@ -0,0 +1,20 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace Snxxz.UI
{
    public class FairyFeastRankBehaviour : MonoBehaviour
    {
        [SerializeField] Text m_RankName;
        [SerializeField] Text m_QuestCount;
        public void Display(string _name, int count)
        {
            m_RankName.text = _name;
            m_QuestCount.text = count > 0 ? Language.Get("FairyQuestCount", count) : string.Empty;
        }
    }
}
System/FairyAu/FairyFeastRankBehaviour.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 1f0124458a333b247ba44882c487f1d0
timeCreated: 1535532258
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/WindowBase/WindowCenter.cs
@@ -14,7 +14,7 @@
        List<string> closeAllIgnoreWindows = new List<string>() {
            "MessageWin", "NewBieWin", "NewItemGetWin", "AttributePromoteShowWin" ,"DungeonBeginCoolDownWin","DungeonFightWin","StatusTipWin"
            ,"ScrollTipWin","MarqueeWin","ExperienceOpenWin","TrumpetWin","BattlePrepareCoolDownWin","DungeonGradeWin","BattleHintWin",
            "TreasureDungeonMissionHintWin","FairyGrabBossHintWin",
            "TreasureDungeonMissionHintWin","FairyGrabBossHintWin","DungeonFairyFeastHintWin",
        };
        UIRoot m_UIRoot;