| Core/GameEngine/Model/Config/FunctionForecastConfig.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Core/GameEngine/Model/Config/FunctionForecastConfig.cs.meta | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/MainInterfacePanel/FeatureNotice2Win.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/MainInterfacePanel/FeatureNotice2Win.cs.meta | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/MainInterfacePanel/FeatureNoticeModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/MainInterfacePanel/FeaturesType3.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/MainInterfacePanel/FeaturesType3.cs.meta | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/MainInterfacePanel/FunctionForecastTip.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Core/GameEngine/Model/Config/FunctionForecastConfig.cs
@@ -1,6 +1,6 @@ //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Monday, September 17, 2018 // [ Date ]: Tuesday, October 30, 2018 //-------------------------------------------------------- using UnityEngine; @@ -12,6 +12,7 @@ public partial class FunctionForecastConfig : ConfigBase { public int FuncId { get ; private set ; } public string Award { get ; private set; } public string FuncName { get ; private set; } public int OpenLevel { get ; private set ; } public string Describe { get ; private set; } @@ -37,33 +38,35 @@ { FuncId=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; FuncName = rawContents[1].Trim(); Award = rawContents[1].Trim(); OpenLevel=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0; FuncName = rawContents[2].Trim(); Describe = rawContents[3].Trim(); OpenLevel=IsNumeric(rawContents[3]) ? int.Parse(rawContents[3]):0; FuncIconKey = rawContents[4].Trim(); Describe = rawContents[4].Trim(); DetailDescribe = rawContents[5].Trim(); FuncIconKey = rawContents[5].Trim(); OpenDescribe = rawContents[6].Trim(); DetailDescribe = rawContents[6].Trim(); Icon = rawContents[7].Trim(); OpenDescribe = rawContents[7].Trim(); Content = rawContents[8].Trim(); Icon = rawContents[8].Trim(); DisplayLevel=IsNumeric(rawContents[9]) ? int.Parse(rawContents[9]):0; Content = rawContents[9].Trim(); Display=IsNumeric(rawContents[10]) ? int.Parse(rawContents[10]):0; DisplayLevel=IsNumeric(rawContents[10]) ? int.Parse(rawContents[10]):0; RedPointLV=IsNumeric(rawContents[11]) ? int.Parse(rawContents[11]):0; Display=IsNumeric(rawContents[11]) ? int.Parse(rawContents[11]):0; RedPointPercentage=IsNumeric(rawContents[12]) ? int.Parse(rawContents[12]):0; RedPointLV=IsNumeric(rawContents[12]) ? int.Parse(rawContents[12]):0; FrameLevel=IsNumeric(rawContents[13]) ? int.Parse(rawContents[13]):0; RedPointPercentage=IsNumeric(rawContents[13]) ? int.Parse(rawContents[13]):0; OpenNumber=IsNumeric(rawContents[14]) ? int.Parse(rawContents[14]):0; FrameLevel=IsNumeric(rawContents[14]) ? int.Parse(rawContents[14]):0; OpenNumber=IsNumeric(rawContents[15]) ? int.Parse(rawContents[15]):0; } catch (Exception ex) { Core/GameEngine/Model/Config/FunctionForecastConfig.cs.meta
@@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: bced258647f0fa940b752dd56e6a27e0 timeCreated: 1537175111 timeCreated: 1540903620 licenseType: Free MonoImporter: serializedVersion: 2 System/MainInterfacePanel/FeatureNotice2Win.cs
New file @@ -0,0 +1,145 @@ //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Tuesday, October 30, 2018 //-------------------------------------------------------- using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using TableConfig; using EnhancedUI.EnhancedScroller; namespace Snxxz.UI { public class FeatureNotice2Win : Window { [SerializeField] ScrollerController m_ScrollerController; [SerializeField] Button m_CloseButton; [SerializeField] FeatureNoticeTip m_FeatureNoticeTip; [SerializeField] ScaleTween m_ScaleTween; FeatureNoticeModel featureNoticeModel { get { return ModelCenter.Instance.GetModel<FeatureNoticeModel>(); } } private bool IsJump = false; #region Built-in protected override void BindController() { m_ScrollerController.OnRefreshCell += OnRefreshGridCell; } protected override void AddListeners() { m_CloseButton.AddListener(OnClickBtn); } protected override void OnPreOpen() { UnopenedFirst(); m_ScaleTween.SetStartState(); IsJump = WindowJumpMgr.Instance.IsJumpState; m_FeatureNoticeTip.Init(); OnCreateGridLineCell(m_ScrollerController); } protected override void OnAfterOpen() { if (!IsJump)//是否经历跳转打开 { m_ScaleTween.Play(false, IsOpen); } else { m_ScaleTween.SetEndState(); } } protected override void OnPreClose() { } protected override void OnAfterClose() { } private void OnClickBtn() { if (!WindowJumpMgr.Instance.IsJumpState)//是否经历跳 { m_FeatureNoticeTip.FeatureNoticeTipObj.SetActive(true); m_ScaleTween.Play(true, IsClose); } else { Close(); WindowCenter.Instance.Open<MainInterfaceWin>(); } } void OnCreateGridLineCell(ScrollerController gridCtrl) { gridCtrl.Refresh(); for (int i = 0; i < featureNoticeModel.FunctionList.Count; i++) { gridCtrl.AddCell(ScrollerDataType.Header, featureNoticeModel.FunctionList[i].FuncId); } gridCtrl.Restart(); } private void OnRefreshGridCell(ScrollerDataType type, CellView cell) { int funcId = cell.index; Transform Tran = cell.transform; GameObject Tran1 = Tran.Find("FeaturesTypeOne").gameObject; GameObject Tran2 = Tran.Find("FeaturesTypeTwo").gameObject; if (funcId == featureNoticeModel.FunctionForecastIndex) { Tran1.SetActive(false); Tran2.SetActive(true); FeaturesType3 featuresType3 = Tran2.GetComponent<FeaturesType3>(); featuresType3.GetTheFeatureID(funcId); return; } else { Tran1.SetActive(true); Tran2.SetActive(false); FeaturesType3 featuresType3 = Tran1.GetComponent<FeaturesType3>(); featuresType3.GetTheFeatureID(funcId); return; } } private void IsOpen() { m_FeatureNoticeTip.FeatureNoticeTipObj.SetActive(false); } private void IsClose() { Close(); WindowCenter.Instance.Open<MainInterfaceWin>(); } private void UnopenedFirst() { var configs = Config.Instance.GetAllValues<FunctionForecastConfig>(); foreach (var config in configs) { int openTag = config.FuncId; if (!FuncOpen.Instance.IsFuncOpen(openTag)) { featureNoticeModel.FunctionForecastIndex = config.OpenNumber; return; } } } #endregion } } System/MainInterfacePanel/FeatureNotice2Win.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: b0f88c388c36a6942b7d00ae54cbfd11 timeCreated: 1540882386 licenseType: Free MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: System/MainInterfacePanel/FeatureNoticeModel.cs
@@ -14,6 +14,7 @@ public class FeatureNoticeModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk { public List<FunctionForecastConfig> FunctionList = new List<FunctionForecastConfig>(); public Dictionary<int, ImpactRankModel.RankAwardItem> DicAwardItem = new Dictionary<int, ImpactRankModel.RankAwardItem>();//奖励物品 private const int Redpoint_key1 = 38; public Redpoint redPointStre1 = new Redpoint(Redpoint_key1); private int OpenFuncId = 0; @@ -23,6 +24,7 @@ public override void Init() { AddList(); AddAwardItem(); } public void OnBeforePlayerDataInitialize() @@ -97,6 +99,43 @@ } } private void AddAwardItem() { if (DicAwardItem.Count <= 0) { var configs = Config.Instance.GetAllKeys<FunctionForecastConfig>(); foreach (var key in configs) { var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(key); if (!DicAwardItem.ContainsKey(functionForecastConfig.FuncId) && functionForecastConfig.Display==1) { ImpactRankModel.RankAwardItem _award = new ImpactRankModel.RankAwardItem(); if (functionForecastConfig.Award == string.Empty) { continue; } var _jsonData = LitJson.JsonMapper.ToObject(functionForecastConfig.Award); foreach (string _key in _jsonData.Keys) { var _job = int.Parse(key); var _itemArray = LitJson.JsonMapper.ToObject<int[][]>(_jsonData[_key].ToJson()); for (int j = 0; j < _itemArray.Length; j++) { _award.Add(_job, new AwardItem() { item = new Item(_itemArray[j][0], _itemArray[j][1]), isBind = 1, }); } } DicAwardItem.Add(functionForecastConfig.FuncId, _award); } } // DebugEx.LogError(DicAwardItem); } } private void RedDotStatus() { for (int i = 0; i < FunctionList.Count; i++) System/MainInterfacePanel/FeaturesType3.cs
New file @@ -0,0 +1,75 @@ //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Tuesday, October 30, 2018 //-------------------------------------------------------- using UnityEngine; using System.Collections; using UnityEngine.UI; using TableConfig; namespace Snxxz.UI { //功能预告第三部 public class FeaturesType3:MonoBehaviour { [SerializeField] ImageEx m_Image_Selected;//底板 [SerializeField] ImageEx m_Img_Circle;//Icon框 [SerializeField] ImageEx m_FeaturesTypeIcon;//Icon [SerializeField] Text m_FunctionName;//功能名 [SerializeField] Text m_FunctionalLevel;//功能等级 [SerializeField] Text m_Content;//内容 FeatureNoticeModel featureNoticeModel { get { return ModelCenter.Instance.GetModel<FeatureNoticeModel>(); } } public void GetTheFeatureID(int funcId) { var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(funcId); if (functionForecastConfig == null) { return; } m_FunctionalLevel.text = functionForecastConfig.DisplayLevel.ToString() + Language.Get("Z1041"); bool Type = false; int NeedLv = 0; int playerLv = PlayerDatas.Instance.baseData.LV; if (functionForecastConfig.OpenNumber - 2 >= featureNoticeModel.FunctionForecastIndex) { Type = true; NeedLv = featureNoticeModel.GetOpenLv(functionForecastConfig.OpenNumber - 2); } if (!FuncOpen.Instance.IsFuncOpen(funcId) && Type && NeedLv > playerLv) { m_FunctionName.text = "?"; m_FeaturesTypeIcon.SetSprite("UnKnowIcon"); m_Content.text= string.Format(Language.Get("YGFuncLevel"), NeedLv, PlayerDatas.Instance.baseData.LV, NeedLv); } else { m_FunctionName.text = functionForecastConfig.FuncName; m_FeaturesTypeIcon.SetSprite(functionForecastConfig.FuncIconKey); m_Content.text = functionForecastConfig.Content; } if (PlayerDatas.Instance.baseData.LV >= functionForecastConfig.DisplayLevel) { m_FunctionalLevel.color = new Color32(141, 220, 17, 255); } else { m_FunctionalLevel.color = new Color32(255, 244, 205, 255); } if (FuncOpen.Instance.IsFuncOpen(funcId)) { m_Image_Selected.gray = false; m_Img_Circle.gray = false; m_FeaturesTypeIcon.gray = false; } else { m_Image_Selected.gray = true; m_Img_Circle.gray = true; m_FeaturesTypeIcon.gray = true; } } } } System/MainInterfacePanel/FeaturesType3.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 724340e684b4c0a469bfb9b4a362747a timeCreated: 1540887239 licenseType: Free MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: System/MainInterfacePanel/FunctionForecastTip.cs
@@ -118,7 +118,7 @@ void FunctionIconBtn()//面板开启 { WindowCenter.Instance.Close<MainInterfaceWin>(); WindowCenter.Instance.Open<FeatureNoticeWin>(); WindowCenter.Instance.Open<FeatureNotice2Win>(); // WindowCenter.Instance.Open<ZXWTestWin>(); } }