示例#1
0
    private void OnMouseDown()
    {
        if (deckOfCards.Count != 0)
        {
            checkHandToDraw(userHandRef);

            if (ableToDraw == true)
            {
                userHandRef.SetHandState(UserHand.HandState.DrawCard);
            }

            if (userHandRef.GetHandState() == UserHand.HandState.DrawCard)
            {
                userHandRef.DrawCardInHand(userHandRef.GetCardHand().Count);

                checkHandToDraw(userHandRef);

                if (ableToDraw == true)
                {
                    StartCoroutine(gMRef.AITurn());
                }
                else
                {
                    if (userHandRef.GetCardHand().Count == 2)
                    {
                        gMRef.checkInteractiveButton(true);
                    }
                    userHandRef.SetHandState(UserHand.HandState.PlayCard);
                }
            }
        }
    }