Esempio n. 1
0
    private void LoadFaction()
    {
        GameObject    card;
        List <string> tempCollection = Account.GetFactionCollection(factions[ActiveFactionIndex]);

        foreach (string cardname in tempCollection)
        {
            card = AllCards.CreateCard(cardname);
            Collection.AddCard(card);
        }
    }
    private void Start()
    {
        //Create all cards within the collection

        Account = GameObject.Find("ActiveAccount").GetComponent <AccountCharacteristics>();

        GameObject card;

        CQBCard.FactionType kushan = CQBCard.FactionType.KUSHAN;
        //CQBCard.FactionType taiidan = CQBCard.FactionType.TAIIDAN;

        Debug.Log("Manage-Kushan");
        Debug.Log(Account.playername);
        Account.PrintCollection(0);

        List <string> tempCollection = Account.GetFactionCollection(kushan);

        foreach (string cardname in tempCollection)
        {
            card = AllCards.CreateCard(cardname);
            Collection.AddCard(card);
        }

        // Default View - All cards

        Collection.TransferCards(Manage_Collection.gameObject, kushan);

        deck_list = Account.GetDeck(0);
        Debug.Log(string.Join(" ", deck_list.ToArray()));
        Manage_Collection.ListTransfer(deck_list, Manage_Deck1.gameObject.transform);
        deck_list = Account.GetDeck(1);
        Manage_Collection.ListTransfer(deck_list, Manage_Deck2.gameObject.transform);
        deck_list = Account.GetDeck(2);
        Manage_Collection.ListTransfer(deck_list, Manage_Deck3.gameObject.transform);

        Manage_Deck2.gameObject.SetActive(false);
        Manage_Deck3.gameObject.SetActive(false);
    }