少年修仙传客户端代码仓库
hch
2025-04-03 c154ac0832fe4379a00d3e1cda700e7d2a7383c7
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
//--------------------------------------------------------
//    [Author]:           第二世界
//    [  Date ]:           Wednesday, July 18, 2018
//--------------------------------------------------------
 
using Spine;
using System;
using System.Collections;
using System.Collections.Generic;
 
using UnityEngine;
using UnityEngine.UI;
 
//砍树获得装备界面
namespace vnxbqy.UI
{
    public class FairyTreeAwardCell : CellView
    {
        [SerializeField] ItemCell itemCell;
        [SerializeField] Text unlockTxt;
        
        CutTreeModel cutTreeModel { get { return ModelCenter.Instance.GetModel<CutTreeModel>(); } }
 
        public void Display(int itemID)
        {
            itemCell.Init(new ItemCellModel(itemID, false, 1));
            itemCell.button.AddListener(() =>
            {
                ItemTipUtility.Show(itemID);
            });
            int unLockTreeLV = (int)TreeLVConfig.itemUnlockInfo[(object)itemID];  //如果用int访问会被误解为索引取值 导致越界
            if (cutTreeModel.GetTreeLV() >= unLockTreeLV)
            {
                unlockTxt.text = Language.Get("DemonTreasureSkillGot");
                unlockTxt.color = UIHelper.GetUIColor(TextColType.Green);
            }
            else
            { 
                unlockTxt.text = Language.Get("TreasureSoulRealm", unLockTreeLV);
            }
        }
 
 
 
 
    }
 
}