Beispiel #1
0
    private void MakeCard()
    {
        splashArt = transform.Find("splash").GetComponent <SpriteRenderer>();
        nameText  = gameObject.transform.Find("CardNameText").GetComponent <TextMeshPro>();
        //AttackCostText = transform.Find("AttackCost").GetComponent<TextMeshPro>();
        //DrawCostText = transform.Find("DrawCost").GetComponent<TextMeshPro>();
        effectDiscriptionText = transform.Find("CardDescription").GetComponent <TextMeshPro>();
        backgroundRenderer    = transform.Find("cardBackground").GetComponent <SpriteRenderer>();
        mainCardMat           = backgroundRenderer.material;
        highlightborder       = transform.Find("highlight").GetComponent <SpriteRenderer>();
        clickhighlightborder  = transform.Find("click highlight").GetComponent <SpriteRenderer>();
        keywordTextBox        = transform.Find("keywordText").gameObject;

        if (card.cardSplashArt != null)
        {
            splashArt.sprite = card.cardSplashArt;
        }
        else
        {
            splashArt.sprite = null;
        }
        containedKeywords          = new List <Card.Keywords>();
        nameText.text              = card.cardName;
        cardType                   = card.type;
        gameObject.name            = card.cardName;
        attackCost                 = card.attackBarCost;
        drawCost                   = card.drawBarCost;
        company                    = card.Company;
        effectDiscriptionText.text = card.cardEffectDiscription;
        containedKeywords          = card.containedKeywords;
    }
Beispiel #2
0
    private bool dedicate(Card.CardCompany company)
    {
        CardFunction temp = Services.actionManager.DrawCard();

        if (temp != null)
        {
            return(temp.getCompany() == company);
        }
        return(false);
    }