//--------------------------------------------------------
|
// [Author]: 第二世界
|
// [ Date ]: Friday, March 15, 2019
|
//--------------------------------------------------------
|
using UnityEngine;
|
using System.Collections;
|
using System.Collections.Generic;
|
using UnityEngine.UI;
|
|
namespace vnxbqy.UI
|
{
|
|
public class EquipGetWayWidget : MonoBehaviour
|
{
|
[SerializeField] WayCell[] m_GetWayCells;
|
[SerializeField] Button m_Close;
|
|
EquipModel model { get { return ModelCenter.Instance.GetModel<EquipModel>(); } }
|
|
public void DisplayGetWays(List<int> getWays)
|
{
|
if (getWays == null)
|
{
|
return;
|
}
|
|
for (var i = 0; i < m_GetWayCells.Length; i++)
|
{
|
var behaviour = m_GetWayCells[i];
|
if (i < getWays.Count)
|
{
|
behaviour.SetActive(true);
|
behaviour.Display(0, getWays[i]);
|
}
|
else
|
{
|
behaviour.SetActive(false);
|
}
|
}
|
|
m_Close.SetListener(() => { model.ClearGetWays(); });
|
}
|
|
}
|
|
}
|