예제 #1
0
        //[Header("Card animated local scales in different locations")]
        //[SerializeField] private float _scaleInEnemyHand = 0.33f;
        //[SerializeField] private float _scaleInMyHand = 1f;
        //[SerializeField] private float _scaleOnTable = 1f;


        public void InitGraphics(string cardCode)
        {
            CardCode = cardCode;

            if (cardCode != "BACK")
            {
                Suit  = CardUtil.Suit(cardCode);
                Value = CardUtil.Value(cardCode);
            }

            var sprite = CardUtil.GetSprite(cardCode);

            CardVisual.sprite = sprite;
        }
예제 #2
0
 /// <summary>
 /// Returns number of a card suit
 /// where
 /// 0 is Spades
 /// 1 is hearts
 /// 2 is diamonds
 /// 3 is clubs
 /// </summary>
 public int GetCardSuit()
 {
     return(CardUtil.Suit(CardCode));
 }
예제 #3
0
 /// <summary>
 /// Returns number of a card value
 /// where for example
 /// 6 is 6
 /// 9 is 9
 /// 11 is J (Jocker = Валет)
 /// 14 is A (Ace = Туз
 /// </summary>
 public int GetCardValue()
 {
     return(CardUtil.Value(CardCode));
 }
예제 #4
0
        /// <summary>
        /// Returns if this card is trump in this game
        /// </summary>
        public bool IsTrump()
        {
            int trumpSuit = CardUtil.Suit(StaticRoomData.TrumpCardCode);

            return(Suit == trumpSuit);
        }