Example #1
0
        public void update(THHPlayer player, TouhouCardEngine.Card card, CardSkinData skin)
        {
            this.card = card;

            Table table = GetComponentInParent <Table>();

            if (skin != null)
            {
                Image.sprite = skin.image;
            }
            AttackText.text = card.getAttack().ToString();
            HpText.text     = card.getCurrentLife().ToString();

            if (table.selectableTargets != null && table.selectableTargets.Contains(this))
            {
                HighlightController = Highlight.Yellow;
            }
            else if (table.player == player && table.game.currentPlayer == player && card.canAttack(table.game))
            {
                HighlightController = Highlight.Green;
            }
            else
            {
                HighlightController = Highlight.None;
            }
            getChild("Root").getChild("Taunt").gameObject.SetActive(card.isTaunt());
            getChild("Root").getChild("Shield").gameObject.SetActive(card.isShield());
        }