예제 #1
0
    public void ShowCardType(PokerSide side)
    {
        CardType.gameObject.SetActive(true);
        List <PokerCard> cardList = new List <PokerCard>(side.Cards);
        PokerCardType    cardType = PokerHelper.GetCardsType(ref cardList);

        CardType.sprite = Resources.Load <Sprite>("cardtype/" + cardType);
    }
예제 #2
0
        public static int CardGroupCompare(ref List <PokerCard> sourceCards, ref List <PokerCard> targetCards)
        {
            PokerCardType sourcePokerCardType = GetCardsType(ref sourceCards);
            PokerCardType targetPokerCardType = GetCardsType(ref targetCards);

            if (sourcePokerCardType > targetPokerCardType)
            {
                return(1);
            }
            else if (sourcePokerCardType < targetPokerCardType)
            {
                return(-1);
            }
            else
            {
                if (sourcePokerCardType == PokerCardType.Bomb)
                {
                    return(BombCompare(ref sourceCards, ref targetCards));
                }
                else if (sourcePokerCardType == PokerCardType.Ferro)
                {
                    return(FerroCompare(ref sourceCards, ref targetCards));
                }
                else if (sourcePokerCardType == PokerCardType.ThreeBars)
                {
                    return(ThreeBarsCompare(ref sourceCards, ref targetCards));
                }
                else if (sourcePokerCardType == PokerCardType.Other)
                {
                    return(OtherCompare(ref sourceCards, ref targetCards));
                }
                else
                {
                    return(0);
                }
            }
        }