Beispiel #1
0
        private void CardVM_OnIndexChangeEvent()
        {
            if (drawed && this != null)
            {
                switch (CurrentState)
                {
                case state.center:
                    // 调整中心位置
                    if (Deck.ThrowingCard)
                    {
                        PlayAnimation("CardToCenter", new CardPositionEventArgs(Deck.ThrowingCardCount, cardVM.Index, cardVM.Board.IsSelf), null);
                    }
                    break;

                case state.hand:
                    // 调整手牌位置
                    PlayAnimation("CardToHand", new CardPositionEventArgs(Deck.HandCardCount, cardVM.Index, cardVM.Board.IsSelf), null);
                    break;
                }
            }
            else
            {
                // 首次抽卡动画
                PlayAnimation("DrawCard", new CardPositionEventArgs(Deck.HandCardCount, cardVM.Index, cardVM.Board.IsSelf), (a, b) =>
                {
                    drawed = true;
                    cardVM.DoAction(new CardDrewEventArgs());
                });
            }
        }