| Core/GameEngine/Model/Config/FunctionForecastConfig.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Core/GameEngine/Model/Config/FunctionForecastConfig.cs.meta | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/MainInterfacePanel/FeatureNoticeWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/MainInterfacePanel/FeatureNoticeWin.cs.meta | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/MainInterfacePanel/FeaturesType1.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/MainInterfacePanel/FeaturesType1.cs.meta | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/MainInterfacePanel/FeaturesType2.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/MainInterfacePanel/FeaturesType2.cs.meta | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/MainInterfacePanel/FunctionForecastTip.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Core/GameEngine/Model/Config/FunctionForecastConfig.cs
@@ -1,6 +1,6 @@ //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Saturday, January 06, 2018 // [ Date ]: Tuesday, September 11, 2018 //-------------------------------------------------------- using UnityEngine; @@ -11,13 +11,17 @@ public partial class FunctionForecastConfig : ConfigBase { public int FuncId { get ; private set ; } public string FuncName { get ; private set; } public int OpenLevel { get ; private set ; } public string Describe { get ; private set; } public string FuncIconKey { get ; private set; } public string DetailDescribe { get ; private set; } public string OpenDescribe { get ; private set; } public int FuncId { get ; private set ; } public string FuncName { get ; private set; } public int OpenLevel { get ; private set ; } public string Describe { get ; private set; } public string FuncIconKey { get ; private set; } public string DetailDescribe { get ; private set; } public string OpenDescribe { get ; private set; } public string Icon { get ; private set; } public string Content { get ; private set; } public int DisplayLevel { get ; private set ; } public int Display { get ; private set ; } public override string getKey() { @@ -27,19 +31,27 @@ public override void Parse() { try { FuncId=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; FuncName = rawContents[1].Trim(); OpenLevel=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0; Describe = rawContents[3].Trim(); FuncIconKey = rawContents[4].Trim(); DetailDescribe = rawContents[5].Trim(); OpenDescribe = rawContents[6].Trim(); FuncId=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; FuncName = rawContents[1].Trim(); OpenLevel=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0; Describe = rawContents[3].Trim(); FuncIconKey = rawContents[4].Trim(); DetailDescribe = rawContents[5].Trim(); OpenDescribe = rawContents[6].Trim(); Icon = rawContents[7].Trim(); Content = rawContents[8].Trim(); DisplayLevel=IsNumeric(rawContents[9]) ? int.Parse(rawContents[9]):0; Display=IsNumeric(rawContents[10]) ? int.Parse(rawContents[10]):0; } catch (Exception ex) { Core/GameEngine/Model/Config/FunctionForecastConfig.cs.meta
@@ -1,7 +1,7 @@ fileFormatVersion: 2 guid: bced258647f0fa940b752dd56e6a27e0 timeCreated: 1515213580 licenseType: Pro timeCreated: 1536670750 licenseType: Free MonoImporter: serializedVersion: 2 defaultReferences: [] System/MainInterfacePanel/FeatureNoticeWin.cs
New file @@ -0,0 +1,109 @@ //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Tuesday, September 11, 2018 //-------------------------------------------------------- using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using TableConfig; namespace Snxxz.UI { //功能预告面板 public class FeatureNoticeWin : Window { [SerializeField] Text m_TextAdvanceName;//功能名 [SerializeField] Image m_FeaturesImage;//功能图标 [SerializeField] Text m_Text_ShowA;//显示内容1 [SerializeField] Text m_TextShowB;//显示内容2 [SerializeField] Text m_TextShowC;//显示内容3 [SerializeField] Text m_TextShowD;//显示内容4 [SerializeField] ScrollerController m_ScrollerController; [SerializeField] Button m_CloseButton; List<FunctionForecastConfig> FunctionList = new List<FunctionForecastConfig>(); #region Built-in protected override void BindController() { } protected override void AddListeners() { m_CloseButton.AddListener(()=> { Close(); }); } protected override void OnPreOpen() { AddList(); m_ScrollerController.OnRefreshCell += OnRefreshGridCell; OnCreateGridLineCell(m_ScrollerController); } protected override void OnAfterOpen() { } protected override void OnPreClose() { m_ScrollerController.OnRefreshCell -= OnRefreshGridCell; } void OnCreateGridLineCell(ScrollerController gridCtrl) { gridCtrl.Refresh(); for (int i = 0; i < FunctionList.Count; i++) { if (i == 0) { gridCtrl.AddCell(ScrollerDataType.Header, FunctionList[i].FuncId); } else { gridCtrl.AddCell(ScrollerDataType.Normal, FunctionList[i].FuncId); } } gridCtrl.Restart(); } private void OnRefreshGridCell(ScrollerDataType type, CellView cell) { int funcId = cell.index; if (type == ScrollerDataType.Header) { FeaturesType1 featuresType1 = cell.GetComponent<FeaturesType1>(); featuresType1.GetTheFeatureID(funcId); } else if (type == ScrollerDataType.Normal) { FeaturesType2 featuresType2 = cell.GetComponent<FeaturesType2>(); featuresType2.GetTheFeatureID(funcId); } } protected override void OnAfterClose() { } #endregion private void AddList() { if (FunctionList.Count <= 0) { var configs = Config.Instance.GetAllKeys<FunctionForecastConfig>(); foreach (var key in configs) { var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(key); if (functionForecastConfig != null && functionForecastConfig.Display == 1) { FunctionList.Add(functionForecastConfig); } } } } } } System/MainInterfacePanel/FeatureNoticeWin.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 55496dc3003cbc34fadba4d7c13f52a1 timeCreated: 1536658956 licenseType: Free MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: System/MainInterfacePanel/FeaturesType1.cs
New file @@ -0,0 +1,49 @@ //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Tuesday, September 11, 2018 //-------------------------------------------------------- using UnityEngine; using System.Collections; using UnityEngine.UI; using TableConfig; //功能开启类型1 namespace Snxxz.UI { public class FeaturesType1 : MonoBehaviour { [SerializeField] Text m_FunctionalLevel;//功能等级 [SerializeField] Text m_FunctionName;//功能名 [SerializeField] Image m_FeaturesTypeIcon;//功能图标 [SerializeField] GameObject m_ImageSelected; [SerializeField] Button m_Button; public GameObject ImageSelected { get { return m_ImageSelected; } set { m_ImageSelected = value; } } public Button Button { get { return m_Button; } set { m_Button = value; } } public void GetTheFeatureID(int funcId) { var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(funcId); if (functionForecastConfig == null) { return; } m_FunctionName.text = functionForecastConfig.FuncName; m_FunctionalLevel.text = functionForecastConfig.DisplayLevel.ToString(); m_FeaturesTypeIcon.SetSprite(functionForecastConfig.FuncIconKey); } } } System/MainInterfacePanel/FeaturesType1.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 795059b4cac43114e9736f1d1d35f953 timeCreated: 1536671120 licenseType: Free MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: System/MainInterfacePanel/FeaturesType2.cs
New file @@ -0,0 +1,49 @@ //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Tuesday, September 11, 2018 //-------------------------------------------------------- using UnityEngine; using System.Collections; using UnityEngine.UI; using TableConfig; //功能开启类型2 namespace Snxxz.UI { public class FeaturesType2:MonoBehaviour { [SerializeField] Text m_FunctionalLevel;//功能等级 [SerializeField] Text m_FunctionName;//功能名 [SerializeField] Image m_FeaturesTypeIcon;//功能图标 [SerializeField] GameObject m_ImageSelected; [SerializeField] Button m_Button; [SerializeField] GameObject m_DefaultBar; [SerializeField] GameObject m_SelectedBar; public GameObject ImageSelected { get { return m_ImageSelected; } set { m_ImageSelected = value; } } public Button Button { get { return m_Button; } set { m_Button = value; } } public void GetTheFeatureID(int funcId) { var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(funcId); if (functionForecastConfig == null) { return; } m_FunctionName.text = functionForecastConfig.FuncName; m_FunctionalLevel.text = functionForecastConfig.DisplayLevel.ToString(); m_FeaturesTypeIcon.SetSprite(functionForecastConfig.FuncIconKey); } } } System/MainInterfacePanel/FeaturesType2.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 89285e8e343e2c04e99f61278a4a38c3 timeCreated: 1536671931 licenseType: Free MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: System/MainInterfacePanel/FunctionForecastTip.cs
@@ -115,7 +115,8 @@ void FunctionIconBtn()//面板开启 { WindowCenter.Instance.Open<FunctionForecastWin>(); // WindowCenter.Instance.Open<FunctionForecastWin>(); WindowCenter.Instance.Open<FeatureNoticeWin>(); } }