Beispiel #1
0
    public void AddAllButton()
    {
        // add 1
        VipButton button     = AddButton();
        Vector2   buttonSize = button.GetSize();

        int num = Mathf.CeilToInt(panel_ScrollView.GetViewSize().y / buttonSize.y);

        // add 1
        num += 1;

        button_num = num + 1;

        for (int i = 0; i < num; i++)
        {
            AddButton();
        }
    }
Beispiel #2
0
    void OnInitializeHeroCards(GameObject go, int wrapIndex, int realIndex)
    {
        if (lst_VipReward.Count <= 0)
        {
            return;
        }
        if (go == null)
        {
            return;
        }

        int lstIndex = realIndex % lst_VipReward.Count;

        if (lstIndex < 0)
        {
            lstIndex = -lstIndex;
        }

        VipButton button = go.GetComponent <VipButton>();

        button.Set(lst_VipReward[lstIndex]._order, lst_VipReward[lstIndex], lst_VipRewardDaily[lstIndex]);
        //     typeData[lstIndex]._name, typeData[lstIndex]._id, typeData[lstIndex]._element, typeData[lstIndex]._hero_class, false);
    }