少年修仙传客户端代码仓库
client_linchunjie
2019-04-17 f1f2599ba0e6b64358ffef7ae5c9f9af3ed8b8b4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
//--------------------------------------------------------
//    [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);
            _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.AppendColor(TextColType.Blue, itemPathModel.extraInfos[1]));
 
        }
 
        protected override IEnumerator SetScrollSize()
        {
            return base.SetScrollSize();
        }
    }
}