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());
    }
Пример #2
0
 public override void Remove()
 {
     foreach (var drawable in Drawables.Drawables)
     {
         DrawStack.Pop(drawable);
     }
     base.Remove();
 }
Пример #3
0
 internal void DestroyDrawable(Drawable drawable, DrawStack drawStack)
 {
     if (drawStack != null)
     {
         drawStack.Pop(drawable);
     }
     drawable.Cleanup();
 }