public void PrepareDeckForPlayerAndGetReadyForSaving() { if (initialized) { PlayerAndEnemyDeckHolder.PrepareManuallyBuiltDeckForThePlayerAndGetReadyForSaving(cards); } }
private void NewGame() { Map.StartOfMatch = true; CardsLevel.Clear(); PlayerAndEnemyDeckHolder.PrepareFirstDeckIfNeededForThePlayerAndGetReadyForSaving(forceToPrepare: true); sceneOpener.OpenMapScene(); }
public override void Execute() { do { if (cards != null) { Destroy(cards[0].gameObject); Destroy(cards[1].gameObject); } cards = PlayerAndEnemyDeckHolder.Get2DifferentRandomUnlockedNotMonsterCards(deckSize: 2); } while (cards[0].IsAnotherInstanceOf(cards[1])); customPopUpOpener.OpenDisplayingCardsToChoose ( title: "Earn a Card", warningMessage: "Choose a card to add to your collection, I mean, to become your friend.", confirmBtnMessage: "<<< The Leftmost", cancelBtnMessage: "The rightmost >>>", onConfirm: () => { AddCardClosePopUpClearSpot(0); }, onCancel: () => { AddCardClosePopUpClearSpot(1); }, PreMadeAudioRequest.CreateSFX_AND_STOP_BGMAudioRequest(earnCardAudio, audioRequisitor, assignor: gameObject), cards ); }
private void InitializeCards(int amountOfSlots) { cards = PlayerAndEnemyDeckHolder.GetPreparedCardsForThePlayerWithTheRandomCards(); for (int i = 0; i < amountOfSlots; i++) { PutCardInIndexWithSmoothMovement(cards[i], i); ChildMaker.CopySizeDelta(slots[i], cards[i].GetRectTransform()); } }
private IEnumerator PopulateDeck() { yield return(null); cards = new List <Card>(); if (enemysDeck) { cards.AddRange(PlayerAndEnemyDeckHolder.GetPreparedCardsForTheEnemy()); } else { cards.AddRange(PlayerAndEnemyDeckHolder.GetPreparedCardsForThePlayerOrGetRandomDeck()); } for (int i = 0; i < cards.Count; i++) { cards[i].RectTransform.position = transform.position; cards[i].RectTransform.SetParent(transform, true); } }
private void PopulateAmountOfEachCard() { amountOfEachCard = new int[cards.Length]; int[] cardAmounts = CardsCollection.GetCardsCollectionAmounts(); Card[] currentDeck = PlayerAndEnemyDeckHolder.GetPreparedCardsForThePlayerWithTheRandomCards(); // For each card on Deck, subtract 1 from it's amount in the collection. for (int i = 0; i < cards.Length; i++) { int amount = cardAmounts[i]; for (int k = 0; k < currentDeck.Length; k++) { if (cards[i].IsAnotherInstanceOf(currentDeck[k])) { amount--; } } amountOfEachCard[i] = amount; } }
private void Give3CardsThenSeeMap() { CardsCollection.SumToCurrentAmount(PlayerAndEnemyDeckHolder.GetPreparedCardsForTheEnemy()[0], 3); QuitBattleAndGoToMap(); }