lcy
5 天以前 cc349a454d938e4046151233d6639d2c3807da9b
Main/System/ItemTip/ItemTipWayWin.cs
@@ -47,18 +47,49 @@
    {
        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;
        }
    }
}