| | |
| | | |
| | | public class EquipStarMaterialCandidateWidget : MonoBehaviour |
| | | { |
| | | [SerializeField] Text m_Title; |
| | | [SerializeField] Button m_Close; |
| | | [SerializeField] RectTransform m_MaterialContainer; |
| | | [SerializeField] CyclicScroll m_MaterialCycScroll; |
| | | |
| | |
| | | [SerializeField] WayCell[] m_GetWays; |
| | | |
| | | EquipStarModel model { get { return ModelCenter.Instance.GetModel<EquipStarModel>(); } } |
| | | EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } } |
| | | |
| | | public void Display(int level, int place, int starLevel) |
| | | { |
| | | var config = RealmConfig.Get(equipModel.GetEquipSet(level).realm); |
| | | m_Title.text = string.Format("点击选择装备"); |
| | | |
| | | var materials = model.GetMaterials(level, place, starLevel); |
| | | if (materials.IsNullOrEmpty()) |
| | | { |
| | |
| | | if (i < ways.Count) |
| | | { |
| | | behaviour.gameObject.SetActive(true); |
| | | var config = GetItemWaysConfig.Get(ways[i]); |
| | | behaviour.icon.SetSprite(config.Icon); |
| | | behaviour.wayName.text = config.Text; |
| | | behaviour.funcName.text = config.name; |
| | | var getWayConfig = GetItemWaysConfig.Get(ways[i]); |
| | | behaviour.icon.SetSprite(getWayConfig.Icon); |
| | | behaviour.wayName.text = getWayConfig.Text; |
| | | behaviour.funcName.text = getWayConfig.name; |
| | | behaviour.wayButton.SetListener(() => |
| | | { |
| | | WindowCenter.Instance.Close<EquipFrameWin>(); |
| | | ModelCenter.Instance.GetModel<GetItemPathModel>().ClickGetWay(config.ID); |
| | | ModelCenter.Instance.GetModel<GetItemPathModel>().ClickGetWay(getWayConfig.ID); |
| | | }); |
| | | } |
| | | else |
| | |
| | | |
| | | m_MaterialCycScroll.Init(materials); |
| | | } |
| | | |
| | | m_Close.SetListener(Close); |
| | | } |
| | | |
| | | private void Close() |
| | | { |
| | | model.operateMaterialIndex.value = 0; |
| | | } |
| | | } |
| | | |
| | | } |