//--------------------------------------------------------
|
// [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;
|
}
|
}
|
|
}
|
|
}
|
|
|
|