private void AddCardToHand(CardRoot cardRootScript) { CardsInHand.Add(cardRootScript); //disable interaction cardRootScript.InteractionDisable(); cardsN++; }
/// <summary> /// Covers card on table with dropped card. Adds to covered cards list /// </summary> protected override void AnimateCoverCardBy(CardRoot cardOnTable, CardRoot heldCard) { //Disable interactions cardOnTable.InteractionDisable(); //Animate heldCard.AnimateMoveToTransform(cardOnTable.CoveredCardContainer); cardOnTable.CoveredCardContainer.SetAsLastSibling(); }
/// <summary> /// Animates covering card on table with held card /// </summary> protected void CoverThisCardWith(CardRoot cardOnTable, CardRoot heldCard) { //TODO save action in buffer for in case if server will say no so we can ctrl+z this action // Beat it AnimateCoverCardBy(cardOnTable, heldCard); heldCard.InteractionDisable(); // add to list cardsOnTableCovering.Add(heldCard); //Set cards parameters cardOnTable.IsCoveredByACard = true; cardOnTable.CoveredByCard = heldCard; // Send to server ClientSendPackets.Send_CoverCardOnTable(cardOnTable.CardCode, heldCard.CardCode); TableUpdated(); }
/// <summary> /// Adds card to table from my hand and animates it /// </summary> protected void MeAddCardToTable(CardRoot heldCard) { //disable interactions heldCard.InteractionDisable(); //ADD CARD cardsOnTable.Add(heldCard); //init animation AnimateAddCardOnTableFromMyHand(heldCard); //TODO save action in buffer for in case if server will say no so we can ctrl+z this action //Send to server ClientSendPackets.Send_DropCardOnTable(heldCard.CardCode); // if my hand is empty then count as pass if (StaticRoomData.MyPlayer.CardsNumber == 0 && MeLeadAttack) { AttackerPassedPriority = true; } TableUpdated(); }