Exemplo n.º 1
0
    public void GenerateCard(Card newCard)
    {
        GameObject hiddenCard = Instantiate(this.cardInvisiblePrefab, this.cardHiddenContainer.transform.position, this.transform.rotation, this.cardHiddenContainer.transform) as GameObject;

        L_Cards_hidden.Add(hiddenCard);
        this.UpdateSpacing();

        GameObject card       = Instantiate(this.cardPrefab, this.instantiateCardPos.transform.position, this.transform.rotation, this.cardVisibleContainer.transform) as GameObject;
        CardPanel  cardScript = card.GetComponent <CardPanel> ();

        cardScript.Init(newCard, L_Cards_hidden.Count - 1, hiddenCard);
        L_Cards_visible.Add(card);
    }