예제 #1
0
    void SetQuickGameDecks()
    {
        Assert.IsTrue(deckManager != null);
        // save current editing deck
        deckManager.SaveDeck();

        // set decks on GameSettings static data
        GameSettings.INSTANCE.SetAttackDeck(deckManager.CollapseDeck(deckManager.LoadDeckRaw(-1)));
        // pray to have a save...
        GameSettings.INSTANCE.SetTargetDeck(deckManager.CollapseDeck(deckManager.LoadDeckRaw(-2)));
    }
예제 #2
0
    public void OpenAidPacket(int cardCount)
    {
        button.interactable  = false;
        transform.localScale = initScale;

        CardType[] raw_deck = new CardType[cardCount];
        for (int i = 0; i < cardCount; ++i)
        {
            raw_deck[i] = (CardType)GameSettings.INSTANCE.randomizer.Next(0, (int)CardType.CardType_Count);
        }
        CardTypeCount[] deck = deckManager.CollapseDeck(raw_deck.ToList());

        StartCoroutine(RewardAnimation(deck));
    }
예제 #3
0
    /*
     * public void AddRandomAidPacket(int max_card_count)
     * {
     *  Assert.IsTrue(selected_node != null && selected_node.army != null);
     *  CardType[] raw_deck = new CardType[max_card_count];
     *  for (int i = 0; i < max_card_count; ++i) {
     *      raw_deck[i] = (CardType)GameSettings.INSTANCE.randomizer.Next(0, (int)CardType.CardType_Count);
     *  }
     *  CardTypeCount[] deck = menu.deckManager.CollapseDeck(raw_deck.ToList());
     *
     *  StartCoroutine(menu.deckManager.RewardAnimation(deck));
     * }
     * public void AddRandomCardsToSelectedDeck(int count)
     * {
     *  if (selected_node == null || selected_node.army == null)
     *      return;
     *  Deck deck = selected_node.army;
     *
     *  for (int i = 0; i < count; ++i)
     *  {
     *      deck.AddToDeck((CardType)GameSettings.INSTANCE.randomizer.Next(0, (int)CardType.CardType_Count), 1);
     *  }
     *  deck.UpdateText();
     * }
     */



    public void SetAttackerFromDeckEditor(DeckManager deckManager)
    {
        target_node.army.SetDeck(deckManager.CollapseDeck(deckManager.GetDeckUncollapsed()));
        target_node.army.UpdateText();
    }