コード例 #1
0
    private void Start()
    {
        //Create all cards within the collection

        Account = GameObject.Find("ActiveAccount").GetComponent <AccountCharacteristics>();
        CQBCard.FactionType kushan  = CQBCard.FactionType.KUSHAN;
        CQBCard.FactionType taiidan = CQBCard.FactionType.TAIIDAN;


        //TESTING
        Account.LoadExistingPlayer(Account.GetPlayerName());
        //

        factions.Add(kushan);
        factions.Add(taiidan);

        Debug.Log(Account.playername);
        Account.PrintCollection(0);


        ActiveFactionIndex = 0;
        LoadFaction();
        Collection.TransferCards(factionCollections[ActiveFactionIndex].gameObject, factions[ActiveFactionIndex]);


        ActiveFactionIndex = 1;
        LoadFaction();
        List <GameObject> cards = Collection.TransferCards(factionCollections[ActiveFactionIndex].gameObject, factions[ActiveFactionIndex]);

        foreach (GameObject card in cards)
        {
            card.transform.localScale = new Vector2(.6f, .6f);
        }
        DeactivateCollection();

        ActiveFactionIndex = 0;

        Selector.SetActiveCollection(factionCollections[ActiveFactionIndex]);

        PopulateDecks();

        Manage_Deck2.gameObject.SetActive(false);
        Manage_Deck3.gameObject.SetActive(false);
    }
コード例 #2
0
    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);
    }