| | |
| | | {
|
| | | var way = GetItemWaysConfig.Get(cell.index);
|
| | | var nameText = cell.FindComponent("Text", "name") as Text;
|
| | | nameText.text = way.name;
|
| | | nameText.text = way.Name;
|
| | |
|
| | | var descText = cell.FindComponent("Text", "way") as Text;
|
| | | descText.text = way.Text;
|
| | |
|
| | | cell.GetComponent<Button>().AddListener(()=>
|
| | | { |
| | | UIJumpManager.Instance.OpenWindow(way.WinJumpID);
|
| | | cell.GetComponent<Button>().AddListener(() =>
|
| | | {
|
| | | Run(way);
|
| | | });
|
| | | }
|
| | |
|
| | | void Run(GetItemWaysConfig way)
|
| | | {
|
| | | if (way == null)
|
| | | return;
|
| | | int funcID = way.FuncID;
|
| | | if (FuncOpenLVConfig.HasKey(funcID) && !FuncOpen.Instance.IsFuncOpen(funcID))
|
| | | return;
|
| | | switch (way.Type)
|
| | | {
|
| | | case 0:
|
| | | if (WindowSearchConfig.HasKey(way.WinJumpID))
|
| | | {
|
| | | UIJumpManager.Instance.OpenWindow(way.WinJumpID);
|
| | | }
|
| | | break;
|
| | | case 1:
|
| | | int shopID = int.Parse(way.CustomValue);
|
| | | if (StoreModel.Instance.CheckPopBuyWin(shopID))
|
| | | {
|
| | | StoreModel.Instance.buyShopID = shopID;
|
| | | UIManager.Instance.OpenWindow<BuyItemWin>();
|
| | | }
|
| | | break;
|
| | | default:
|
| | | if (WindowSearchConfig.HasKey(way.WinJumpID))
|
| | | {
|
| | | UIJumpManager.Instance.OpenWindow(way.WinJumpID);
|
| | | }
|
| | | break;
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | |
|
| | |
|