| | |
| | | {
|
| | | public class TrialExchangeBehaviour : MonoBehaviour
|
| | | {
|
| | | [SerializeField] Image m_Bottom;
|
| | | [SerializeField] ItemCell m_Item;
|
| | | [SerializeField] Text m_Description;
|
| | | [SerializeField] ItemBehaviour m_Token;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public void Display(int id, bool equipBetter = true)
|
| | | public void Display(int id, bool equipBetter = true, bool first = false)
|
| | | {
|
| | | m_Bottom.SetSprite(first ? "SpecialExchangeBottom" : "Title_PopupWindow");
|
| | | trialExchangeId = id;
|
| | | var config = ConfigManager.Instance.GetTemplate<TrialExchangeConfig>(id);
|
| | | if (config == null)
|
| | |
| | | model.IsAnySatisfyExchangeBetterEquip(_class, out _betterEquipId);
|
| | | for (int i = 0; i < m_TrialExchanges.Length; i++)
|
| | | {
|
| | | var index = _line * 4 + i;
|
| | | var index = _line * 3 + i;
|
| | | if (index < list.Count)
|
| | | {
|
| | | m_TrialExchanges[i].gameObject.SetActive(true);
|
| | | m_TrialExchanges[i].Display(list[index].id, _betterEquipId == list[index].id);
|
| | | m_TrialExchanges[i].Display(list[index].id, _betterEquipId == list[index].id, (_line + i) == 0);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | public void Display(int _class)
|
| | | {
|
| | | m_Title.text = Language.Get("TrialExchangeTitle", _class);
|
| | | var iconKey = _class == 3 ? "OneStageHuawen" : _class == 4 ? "TwoStageHuawen" : "ThreeStageHuawen";
|
| | | m_BackGround.SetSprite(iconKey);
|
| | | m_BackGround.SetNativeSize();
|
| | | }
|
| | | }
|
| | | } |
| | |
| | | if (model.TryGetTrialExchanges(trialClasses[i], out list))
|
| | | {
|
| | | m_Controller.AddCell(ScrollerDataType.Normal, trialClasses[i]);
|
| | | var line = Mathf.CeilToInt((float)list.Count / 4);
|
| | | var line = Mathf.CeilToInt((float)list.Count / 3);
|
| | | for (int k = 0; k < line; k++)
|
| | | {
|
| | | m_Controller.AddCell(ScrollerDataType.Header, trialClasses[i] * 100 + k);
|
| | |
| | | List<TrialExchangeConfig> list;
|
| | | if (model.TryGetTrialExchanges(model.selectEquipClass, out list))
|
| | | {
|
| | | var line = Mathf.CeilToInt((float)list.Count / 4);
|
| | | var line = Mathf.CeilToInt((float)list.Count / 3);
|
| | | for (int i = 0; i < line; i++)
|
| | | {
|
| | | m_Controller.AddCell(ScrollerDataType.Header, model.selectEquipClass * 100 + i);
|