Exemple #1
0
    private void Start()
    {
        YesButton.OnClick = Accept;
        NoButton.OnClick  = Reject;

        _card = (Card)Activator.CreateInstance(CardList.GetRandomCard());
        CardMB c = CardMB.Spawn(_card);

        _cardObject = c.gameObject;
        Destroy(c);
        _cardObject.transform.position = CardTarget.transform.position;
    }
Exemple #2
0
    public static void DrawCard()
    {
        // if Draws empty, shuffle discard and put into Draws
        if (Draws.Count == 0)
        {
            Shuffle(Discards);
            Draws    = Discards;
            Discards = new List <Card>();
        }

        CardMB newCard = CardMB.Spawn(Draws[0]);

        Hand.Add(newCard);
        Draws.RemoveAt(0);
    }