Esempio n. 1
0
        private CardState randomCard(int id)
        {
            var card = new CardState();

            card.ID       = id;
            card.CardType = (int)CardTypeUtils.RandomCardType();
            return(card);
        }
Esempio n. 2
0
        public void SetCard(CardState card)
        {
            Card = card;

            // TODO: MW Pick the card image based on the card.cardType group
            Sprite sprite = null;

            switch (CardTypeUtils.GroupFromCardType(card.CardType))
            {
            case CardTypeGroup.Unknown:
                sprite = Skinner.Get("Unknown").sprite;
                break;

            case CardTypeGroup.Movement:
                sprite = Skinner.Get("Movement").sprite;
                break;

            case CardTypeGroup.Utility:
                sprite = Skinner.Get("Utility").sprite;
                break;

            case CardTypeGroup.Attack:
                sprite = Skinner.Get("Attack").sprite;
                break;

            default:
                sprite = Skinner.Get("Unknown").sprite;
                break;
            }

            CardImage.sprite = sprite;

            TitleText.text = CardTypeUtils.CardTypeName(card.CardType);
            // TODO: MW Pick the DetailsText based on card.cardType
            DetailsText.text = "Details";
        }