コード例 #1
0
ファイル: CardBehaviour.cs プロジェクト: AlanxxonE/Unomatic
    private void OnMouseDown()
    {
        if (cardStateReference != CardState.AICard)
        {
            if (cardStateReference == CardState.CardInHand)
            {
                if (userCardHand.GetHandState() == UserHand.HandState.PlayCard)
                {
                    if (userCardHand.GetDeck().GetComponent <DeckBehaviour>().GetPileOfCards().GetCardRef().GetComponent <CardBehaviour>().GetUniqueCardIDColor() == this.uniqueCardIDColor || userCardHand.GetDeck().GetComponent <DeckBehaviour>().GetPileOfCards().GetCardRef().GetComponent <CardBehaviour>().GetUniqueCardIDNumber() == this.uniqueCardIDNumber)
                    {
                        userCardHand.SetCardSelected(false);
                        if (this.transform.position != originalCardPos)
                        {
                            this.transform.position = originalCardPos;
                        }

                        PlayCard();
                    }
                }
            }
        }
    }