コード例 #1
0
    void CreateListCardRecharge()
    {
        List <List <RechargeModel> > listGroupProvider = groupCardSameProvider();

        foreach (List <RechargeModel> models in listGroupProvider)
        {
            CardRechargeView.Create(models, tableCard.transform);
        }
        tableCard.Reposition();
    }
コード例 #2
0
    public static CardRechargeView Create(List <RechargeModel> models, Transform parent)
    {
        GameObject obj = (GameObject)GameObject.Instantiate(Resources.Load("Prefabs/HeaderMenu/Recharge/CardRechargeView"));

        obj.transform.parent        = parent;
        obj.transform.localPosition = Vector3.zero;
        obj.transform.localScale    = Vector3.one;
        CardRechargeView card = obj.GetComponent <CardRechargeView>();

        card.SetData(models);
        return(card);
    }