void MoveToChannel() { CGZone channel = m_visualManager.GetPlayerChannel(m_channel); Sequence sequence = channel.MoveCardToZone(m_card); // Move card to channel sequence.AppendCallback(FinishCommand); }
void MoveToChannel() { CGZone channel = m_visualManager.GetOpponentChannel(m_channel); Sequence sequence = channel.MoveCardToZone(m_card); // Move card to channel sequence.Insert(0, m_card.SetFaceDirectionSeq(true, 0.4f)); // Turn card face-up sequence.AppendCallback(FinishCommand); }
/** Close the menu, returning all un-selected cards to the given zone */ public void Close(CGZone previousZone) { List <CardVisual> unselectedCards = new List <CardVisual>(); foreach (CardVisual card in m_cards) { unselectedCards.Add(card); } foreach (CardVisual unselectedCard in unselectedCards) { previousZone.MoveCardToZone(unselectedCard); } // Close the menu Destroy(gameObject); }
public override void ExecuteCommand() { CGZone hand = m_visualManager.GetPlayerHand(); m_card = hand.GetCardWithID(m_cardID); if (m_card == null) { Debug.LogError("Card played does not exist in hand"); // Create a new card m_card = m_visualManager.CreateCard(m_cardData, m_cardID, true); MoveToHand(); } MoveToChannel(); }
public override void ExecuteCommand() { CGZone hand = m_visualManager.GetOpponentHand(); m_card = hand.GetFirstCard(); if (m_card == null) { Debug.LogError("Card played does not exist in hand"); // Create a new card m_card = m_visualManager.CreateCard(m_cardData, m_cardID, false); MoveToHand(); } m_visualManager.DefineCard(m_card, m_cardData, m_cardID); MoveToChannel(); }