Exemplo n.º 1
0
        private void OnPursuitCardClicked(object sender, EventArgs e)
        {
            IPursuitCard clickedCard = (sender as GameObject)
                                       ?.GetComponent <UICardView>()
                                       ?.GetCard() as IPursuitCard;

            this.PursuitCardClicked?.Invoke(clickedCard);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Queue an animation to show the swapping out of a pursuit card for a new one.
        /// </summary>
        public void AnimatePursuitChange(IPursuitCard card, Chase newState)
        {
            foreach (Transform child in this.Pursuit.transform)
            {
                AddAnimationToQueue(new QueuedAnimation(null, null, () => {
                    Destroy(child.gameObject);
                }, null));
            }

            this.SpawnCard(card, CardSpawnLocation.Pursuit);
        }
Exemplo n.º 3
0
        public void Setup(IPursuitCard card)
        {
            m_cardFlavourText.text = card.Name;
            m_cardControlCostLayer.SetActive(false);

            UIPalette.CardTypeColourScheme scheme = UIPalette.Instance.PursuitCardColours;
            SetColourScheme(scheme);
            m_card = card;

            m_cardTypeLayer.SetActive(false);

            m_cardName.color   = Color.white;
            m_cardName.text    = card.Name;
            m_cardEffects.text = card.Description;
            m_cardImage.sprite = card.CardImage;
            SetFlavourText(card.FlavourText);
        }