| Core/GameEngine/Model/Config/TalentConfig.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Core/GameEngine/Model/Config/TalentConfig.cs.meta | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Skill/TalentWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Core/GameEngine/Model/Config/TalentConfig.cs
@@ -1,6 +1,6 @@ //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Wednesday, September 26, 2018 // [ Date ]: Thursday, October 11, 2018 //-------------------------------------------------------- using UnityEngine; @@ -13,7 +13,8 @@ public int skillId { get ; private set ; } public int type { get ; private set ; } public int series { get ; private set ; } public int series { get ; private set ; } public int order { get ; private set ; } public override string getKey() { @@ -27,7 +28,9 @@ type=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; series=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0; series=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0; order=IsNumeric(rawContents[3]) ? int.Parse(rawContents[3]):0; } catch (Exception ex) { Core/GameEngine/Model/Config/TalentConfig.cs.meta
@@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: 86eb4a564c7dcb047bb4509cf2e2758a timeCreated: 1537942940 timeCreated: 1539224901 licenseType: Pro MonoImporter: serializedVersion: 2 System/Skill/TalentWin.cs
@@ -154,12 +154,15 @@ } } List<int> sortTalents = new List<int>(talents); sortTalents.Sort(Compare); var index = 0; if (talents != null && talents.Count > 0) if (sortTalents != null && sortTalents.Count > 0) { index = 0; } model.selectSkill = talents[index]; model.selectSkill = sortTalents[index]; if (selectScriptable != null) { var rect = m_Scroller.transform as RectTransform; @@ -168,10 +171,10 @@ } for (int i = 0; i < m_TalentSkills.Count; i++) { if (talents != null && i < talents.Count) if (sortTalents != null && i < sortTalents.Count) { m_TalentSkills[i].gameObject.SetActive(true); m_TalentSkills[i].Display(talents[i]); m_TalentSkills[i].Display(sortTalents[i]); } else { @@ -445,6 +448,17 @@ } } int Compare(int x, int y) { var configx = Config.Instance.Get<TalentConfig>(x); var configy = Config.Instance.Get<TalentConfig>(y); if (configx != null && configy != null) { return configx.order.CompareTo(configy.order); } return 0; } #if UNITY_EDITOR [ContextMenu("应用位置数据")] void ApplyPositionToScriptable()