Exemplo n.º 1
0
    public void AddCard(CardStruct card)
    {
        GameObject go = GameObject.Instantiate(ResUICard) as GameObject;

        go.SetActive(true);
        _grid.AddChild(go.transform);
        go.transform.localScale = Vector3.one;
        UICard uicard = go.GetComponent <UICard>();

        uicard.Init(card);
        _cardsList.Add(uicard);

        _grid.Reposition();
    }