少年修仙传客户端代码仓库
xingchen Qiu
2019-04-10 b45f84d1a84cb768d0b136fe37ad18364d74af1f
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
//--------------------------------------------------------
//    [Author]:           第二世界
//    [  Date ]:           Thursday, November 16, 2017
//--------------------------------------------------------
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
 
 
namespace Snxxz.UI
{
 
    public class WorldMapUnLockTip : MonoBehaviour
    {
        [SerializeField] Image m_LevelConditionSign;
        [SerializeField] Image m_TreasureConditionSign;
        [SerializeField] Text m_LevelCondtion;
        [SerializeField] Text m_TreasureCondition;
 
        TreasureModel treasureModel { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }
 
        public void Display(int _mapId)
        {
            var config = MapConfig.Get(_mapId);
            m_LevelCondtion.text = Language.Get("WorldMap_LV", config.LV);
            m_LevelCondtion.color = PlayerDatas.Instance.baseData.LV >= config.LV ? UIHelper.GetUIColor(TextColType.Green) : UIHelper.GetUIColor(TextColType.Red);
 
            if (string.IsNullOrEmpty(config.MapTaskText))
            {
                m_TreasureConditionSign.gameObject.SetActive(false);
                m_TreasureCondition.text = "";
            }
            else
            {
                m_TreasureConditionSign.gameObject.SetActive(true);
                m_TreasureCondition.text = config.MapTaskText;
            }
        }
 
    }
 
}