コード例 #1
0
    public IEnumerator RevealCards(RevealCardsCallback callback)
    {
        yield return(hand.HideHand());

        while (true)
        {
            if (DrawStack.Count == 0)
            {
                if (rubbishStack.Count == 0)
                {
                    break;
                }
                rubbishStack.MoveAllCardsToStack(DrawStack, false);
                yield return(DrawStack.Shuffle());

                yield return(new WaitForSeconds(DrawStack.audio.clip.length));
            }
            Card card = DrawStack.Pop();
            iTween.MoveTo(card.gameObject, new Vector3(-37, 72.57f, -495.44f), 0.5f);
            iTween.RotateTo(card.gameObject, new Vector3(320.0f, 180.0f, 180.0f), 0.5f);
            yield return(new WaitForSeconds(0.5f));

            if (callback(card, this))
            {
                yield return(new WaitForSeconds(1));

                break;
            }
            yield return(new WaitForSeconds(1));
        }
        yield return(hand.ShowHand());
    }