//-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Thursday, January 18, 2018 //-------------------------------------------------------- using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using Snxxz.UI; namespace Snxxz.UI { public class RunePathWin : GetItemPathWin { #region Built-in protected override void BindController() { base.BindController(); } protected override void AddListeners() { base.AddListeners(); } protected override void OnPreOpen() { _closeBtn.gameObject.SetActive(true); _bottomPart.gameObject.SetActive(false); _getWaysTips.alpha = 0; tipAlpha.alpha = 0; InitRuneData(); } protected override void OnAfterOpen() { transform.SetAsLastSibling(); StartCoroutine(SetScrollSize()); } protected override void OnPreClose() { } protected override void OnAfterClose() { } #endregion private void InitRuneData() { if (itemPathModel.chinItemModel == null) { return; } bool _isRune = itemPathModel.chinItemModel.Type == RuneModel.RUNE_TYPE; if (!_isRune) { return; } ItemCellModel cellModel = new ItemCellModel(itemPathModel.chinItemModel.ID,false,0, itemPathModel.isBind); _itemCell.Init(cellModel); _nameText.text = StringUtility.Contact(itemPathModel.chinItemModel.ItemName, " Lv.", itemPathModel.level); _nameText.color = UIHelper.GetUIColor(itemPathModel.chinItemModel.ItemColor); _describeText.alignment = TextAnchor.UpperCenter; _describeText.text = StringUtility.Contact(itemPathModel.extraInfos[0], "\n", UIHelper.GetTextColorByItemColor(TextColType.Blue, itemPathModel.extraInfos[1])); } protected override IEnumerator SetScrollSize() { return base.SetScrollSize(); } } }