少年修仙传客户端代码仓库
client_Zxw
2018-09-17 16f61d5473891ddce81191825c6229a4b96fcd16
3625 【前端】功能预告配置,下下个功能不显示
6个文件已修改
113 ■■■■ 已修改文件
Core/GameEngine/Model/Config/FunctionForecastConfig.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/FunctionForecastConfig.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/FeatureNoticeModel.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/FeatureNoticeWin.cs 74 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/FeaturesType1.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/FeaturesType2.cs 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/FunctionForecastConfig.cs
@@ -1,6 +1,6 @@
//--------------------------------------------------------
//    [Author]:            第二世界
//    [  Date ]:           Wednesday, September 12, 2018
//    [  Date ]:           Monday, September 17, 2018
//--------------------------------------------------------
using UnityEngine;
@@ -24,7 +24,8 @@
        public int Display { get ; private set ; }
        public int RedPointLV { get ; private set ; }
        public int RedPointPercentage { get ; private set ; }
        public int FrameLevel { get ; private set ; }
        public int FrameLevel { get ; private set ; }
        public int OpenNumber { get ; private set ; }
        public override string getKey()
        {
@@ -60,7 +61,9 @@
            
                RedPointPercentage=IsNumeric(rawContents[12]) ? int.Parse(rawContents[12]):0; 
            
                FrameLevel=IsNumeric(rawContents[13]) ? int.Parse(rawContents[13]):0;
                FrameLevel=IsNumeric(rawContents[13]) ? int.Parse(rawContents[13]):0;
                OpenNumber=IsNumeric(rawContents[14]) ? int.Parse(rawContents[14]):0;
            }
            catch (Exception ex)
            {
Core/GameEngine/Model/Config/FunctionForecastConfig.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: bced258647f0fa940b752dd56e6a27e0
timeCreated: 1536737693
timeCreated: 1537175111
licenseType: Free
MonoImporter:
  serializedVersion: 2
System/MainInterfacePanel/FeatureNoticeModel.cs
@@ -19,6 +19,7 @@
    private int OpenFuncId = 0;
    private bool RedPointChange = false;
    private bool IsRedPoint = false;
    public int FunctionForecastIndex = 0;
    public override void Init()
    {
        AddList();
System/MainInterfacePanel/FeatureNoticeWin.cs
@@ -14,10 +14,10 @@
    //功能预告面板
    public enum FeatureNoticeEnum
    {
        Pet=6,//灵宠
        Horse=8,//坐骑
        Wing=97,//翅膀
        GossipFurnace=87,//八卦炉
        Pet = 6,//灵宠
        Horse = 8,//坐骑
        Wing = 97,//翅膀
        GossipFurnace = 87,//八卦炉
    }
    public class FeatureNoticeWin : Window
@@ -49,7 +49,7 @@
        protected override void AddListeners()
        {
            m_CloseButton.AddListener(()=> { Close(); });
            m_CloseButton.AddListener(() => { Close(); });
        }
        protected override void OnPreOpen()
@@ -57,8 +57,8 @@
            if (!WindowJumpMgr.Instance.IsJumpState)//是否经历跳转打开
            {
                DefaultSelection();//获取默认选择
            }
            m_ScrollerController.OnRefreshCell += OnRefreshGridCell;
            }
            m_ScrollerController.OnRefreshCell += OnRefreshGridCell;
            OnCreateGridLineCell(m_ScrollerController);
            ContentDisplay();
            m_ScrollerController.JumpIndex(JumpIndex());
@@ -147,7 +147,7 @@
                {
                    featuresType1.ImageSelected.SetActive(false);
                }
                featuresType1.Button.SetListener(()=>
                featuresType1.Button.SetListener(() =>
                {
                    if (funcId != ClickFuncID)
                    {
@@ -181,7 +181,7 @@
            }
        }
        #endregion
        private void DefaultSelection()//获取默认选择
        {
@@ -192,6 +192,7 @@
                if (!FuncOpen.Instance.IsFuncOpen(openTag))
                {
                    ClickFuncID = openTag;
                    featureNoticeModel.FunctionForecastIndex = config.OpenNumber;
                    return;
                }
            }
@@ -204,7 +205,7 @@
        private int JumpIndex()//Jump选中
        {
            int Index = 0;
            Index = featureNoticeModel.FunctionList.FindIndex((x)=>
            Index = featureNoticeModel.FunctionList.FindIndex((x) =>
            {
                return x.FuncId == ClickFuncID;
            });
@@ -217,6 +218,20 @@
            if (functionForecastConfig == null)
            {
                return;
            }
            if (!FuncOpen.Instance.IsFuncOpen(ClickFuncID) && functionForecastConfig.OpenNumber > featureNoticeModel.FunctionForecastIndex)
            {
                m_Text_ShowA.gameObject.SetActive(false);
                m_TextShowB.gameObject.SetActive(false);
                m_TextShowC.gameObject.SetActive(false);
                m_TextShowD.gameObject.SetActive(false);
            }
            else
            {
                m_Text_ShowA.gameObject.SetActive(true);
                m_TextShowB.gameObject.SetActive(true);
                m_TextShowC.gameObject.SetActive(true);
                m_TextShowD.gameObject.SetActive(true);
            }
            m_TextAdvanceName.text = functionForecastConfig.FuncName;
            DisplayIcon(ClickFuncID);
@@ -253,9 +268,16 @@
            UI3DModelExhibition.Instance.StopShowWing();
            UI3DTreasureExhibition.Instance.StopShow();
            var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(ClickFuncID);
            if (!FuncOpen.Instance.IsFuncOpen(ClickFuncID) && functionForecastConfig.OpenNumber > featureNoticeModel.FunctionForecastIndex)
            {
                m_FeaturesImage.gameObject.SetActive(true);
                m_FeaturesImage.SetSprite("YGWENHAO");
                m_FeaturesImage.SetNativeSize();
                return;
            }
            switch (funcID)
            {
                case (int)FeatureNoticeEnum.Pet:
                case (int)FeatureNoticeEnum.Pet:
                    m_RawImage1.gameObject.SetActive(true);
                    var npcConfig = Config.Instance.Get<NPCConfig>(50106001);
                    UI3DModelExhibition.Instance.BeginShowNPC(50106001, npcConfig.UIModeLOffset, npcConfig.UIModelRotation, m_RawImage1);
@@ -267,7 +289,7 @@
                    break;
                case (int)FeatureNoticeEnum.Wing:
                    m_RawImage3.gameObject.SetActive(true);
                    var vec3 = new Vector3(0,90,-90);
                    var vec3 = new Vector3(0, 90, -90);
                    int job = PlayerDatas.Instance.baseData.Job;
                    if (job == 1)
                    {
@@ -301,7 +323,23 @@
            m_Textschedule.gameObject.SetActive(false);
            m_ButtonGoto.gameObject.SetActive(false);
            FuncOpenLVConfig funcoPenConfig = Config.Instance.Get<FuncOpenLVConfig>(funcID);
            if (funcoPenConfig.LimitMagicWeapon != 0 || funcoPenConfig.LimitMissionID != 0)
            var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(ClickFuncID);
            if (!FuncOpen.Instance.IsFuncOpen(ClickFuncID) && functionForecastConfig.OpenNumber > featureNoticeModel.FunctionForecastIndex)
            {
                var functionForecastValue = Config.Instance.GetAllValues<FunctionForecastConfig>();
                string StrNanme = string.Empty;
                foreach (var value in functionForecastValue)
                {
                    if (value.OpenNumber == functionForecastConfig.OpenNumber - 1)
                    {
                        StrNanme = value.FuncName;
                    }
                }
                m_TextUnopened.gameObject.SetActive(true);
                m_TextUnopened.text = string.Format(Language.Get("NextYGLimit"), StrNanme, functionForecastConfig.FuncName);
                return;
            }
                if (funcoPenConfig.LimitMagicWeapon != 0 || funcoPenConfig.LimitMissionID != 0)
            {
                if (funcoPenConfig.LimitMagicWeapon != 0)//法宝
                {
@@ -320,14 +358,14 @@
                    {
                        m_TextUnopened.text = string.Format(Language.Get("YGTask"), funcoPenConfig.LimitLV, PlayerDatas.Instance.baseData.LV, funcoPenConfig.LimitLV);
                    }
                    return;
                }
            }
            else//等级
            {
                m_TextUnopened.gameObject.SetActive(true);
                m_TextUnopened.text= string.Format(Language.Get("YGFuncLevel"), funcoPenConfig.LimitLV,PlayerDatas.Instance.baseData.LV, funcoPenConfig.LimitLV);
                m_TextUnopened.text = string.Format(Language.Get("YGFuncLevel"), funcoPenConfig.LimitLV, PlayerDatas.Instance.baseData.LV, funcoPenConfig.LimitLV);
                return;
            }
        }
@@ -338,7 +376,7 @@
            m_ButtonGoto.gameObject.SetActive(true);
            Treasure treasure;
            TreasureConfig _treasure = Config.Instance.Get<TreasureConfig>(fabaoID);
            m_ButtonGoto.SetListener(()=>
            m_ButtonGoto.SetListener(() =>
            {
                var config = Config.Instance.Get<TreasureConfig>(fabaoID);
                treasureModel.selectedTreasure = fabaoID;
@@ -370,10 +408,10 @@
                        }
                        else
                        {
                            double dou=Math.Round((double)treasure.exp / treasure.treasureStages[funcStage].exp,2);
                            double dou = Math.Round((double)treasure.exp / treasure.treasureStages[funcStage].exp, 2);
                            string str = dou * 100 + "%";
                            m_Textschedule.text = string.Format(Language.Get("YGYouFB"), str);
                        }
                        }
                    }
                    else
                    {
System/MainInterfacePanel/FeaturesType1.cs
@@ -29,8 +29,8 @@
        {
            get { return m_Button; }
            set { m_Button = value; }
        }
        }
        FeatureNoticeModel featureNoticeModel { get { return ModelCenter.Instance.GetModel<FeatureNoticeModel>(); } }
        public void GetTheFeatureID(int funcId)
        {
            var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(funcId);
@@ -40,7 +40,15 @@
            }
            m_FunctionName.text = functionForecastConfig.FuncName;
            m_FunctionalLevel.text = functionForecastConfig.DisplayLevel.ToString()+ Language.Get("Z1041");
            m_FeaturesTypeIcon.SetSprite(functionForecastConfig.FuncIconKey);
            if (!FuncOpen.Instance.IsFuncOpen(funcId) && functionForecastConfig.OpenNumber > featureNoticeModel.FunctionForecastIndex)
            {
                m_FeaturesTypeIcon.SetSprite("UnKnowIcon");
            }
            else
            {
                m_FeaturesTypeIcon.SetSprite(functionForecastConfig.FuncIconKey);
            }
            if (PlayerDatas.Instance.baseData.LV >= functionForecastConfig.DisplayLevel)
            {
                m_FunctionalLevel.color = new Color32(141,220,17,255);
System/MainInterfacePanel/FeaturesType2.cs
@@ -28,8 +28,8 @@
        {
            get { return m_Button; }
            set { m_Button = value; }
        }
        }
        FeatureNoticeModel featureNoticeModel { get { return ModelCenter.Instance.GetModel<FeatureNoticeModel>(); } }
        public void GetTheFeatureID(int funcId)
        {
            var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(funcId);
@@ -39,7 +39,14 @@
            }
            m_FunctionName.text = functionForecastConfig.FuncName;
            m_FunctionalLevel.text = functionForecastConfig.DisplayLevel.ToString()+Language.Get("Z1041");
            m_FeaturesTypeIcon.SetSprite(functionForecastConfig.FuncIconKey);
            if (!FuncOpen.Instance.IsFuncOpen(funcId) && functionForecastConfig.OpenNumber > featureNoticeModel.FunctionForecastIndex)
            {
                m_FeaturesTypeIcon.SetSprite("UnKnowIcon");
            }
            else
            {
                m_FeaturesTypeIcon.SetSprite(functionForecastConfig.FuncIconKey);
            }
            if (PlayerDatas.Instance.baseData.LV >= functionForecastConfig.DisplayLevel)
            {
                m_FunctionalLevel.color = new Color32(141, 220, 17,255);