Ejemplo n.º 1
0
    private void DisplayCardList()
    {
        Int32 id;

        for (id = 0; id < 100; id++)
        {
            Byte b = this.count[id];
            CardUI.CardListHUD cardListHUD = this.cardHudList.First((CardUI.CardListHUD hud) => hud.Id == id);
            if (b > 0)
            {
                CardIcon.Attribute attribute  = QuadMistDatabase.MiniGame_GetCardAttribute(id);
                String             spriteName = String.Concat(new Object[]
                {
                    "card_type",
                    (Int32)attribute,
                    "_",
                    (b <= 1) ? "normal" : "select"
                });
                cardListHUD.CardIconSprite.spriteName = spriteName;
                if (b > 1)
                {
                    cardListHUD.CardAmountLabel.gameObject.SetActive(true);
                    cardListHUD.CardAmountLabel.text = b.ToString();
                }
                else
                {
                    cardListHUD.CardAmountLabel.gameObject.SetActive(false);
                }
            }
            else
            {
                cardListHUD.CardAmountLabel.gameObject.SetActive(false);
                cardListHUD.CardIconSprite.spriteName = "card_slot";
            }
        }
        this.stockCountLabel.text = QuadMistDatabase.MiniGame_GetAllCardCount().ToString();
        this.typeCountLabel.text  = QuadMistDatabase.MiniGame_GetCardKindCount().ToString();
    }