Ejemplo n.º 1
0
    /// <summary>
    /// 卡牌进入等待区
    /// </summary>
    public void CardToWait(CardFighter card, CardArea area)
    {
        RemoveCard(card, area);

        waitCard.Add(card);
        Actions.Add(CardWaitAction.GetAction(ID, card.ID, area));
    }
Ejemplo n.º 2
0
    /// <summary>
    /// 卡牌进入等待区
    /// </summary>
    public float CardWait(BaseAction action)
    {
        CardWaitAction cardWaitAction = action as CardWaitAction;

        CardFighter card = GetCardByID(cardWaitAction.sourceID);

        // 牌堆的卡牌进入等待区
        if (cardInitArea.ContainsCard(card))
        {
            cardInitArea.RemoveCard(card);
            return(cardWaitArea.AddCard(card, cardInitArea.GetPos()));
        }

        // 战斗中的卡牌进入等待区
        if (cardFightArea.ContainsCard(card))
        {
            cardWaitArea.AddCard(card);
            return(cardFightArea.RemoveCard(card, cardWaitArea.GetPos(card)));
        }

        // 死亡的卡牌进入等待区
        if (cardDeadArea.ContainsCard(card))
        {
            cardDeadArea.RemoveCard(card);
            return(cardWaitArea.AddCard(card, cardDeadArea.GetPos()));
        }

        return(0f);
    }
Ejemplo n.º 3
0
 /// <summary>
 /// 卡牌进入等待区
 /// </summary>
 public void DoWait()
 {
     Actions.Add(CardWaitAction.GetAction(owner.ID, this.ID));
     owner.CardToWait(this);
 }