private void DoSetup()
    {
        InitialFilterSetup();
        runnerEquipButton.interactable = false;
        hackerEquipButton.interactable = false;
        switch (hackerOrRunner)
        {
        case Item.HackerRunner.Runner:
            hackerContext.SetActive(false);
            runnerContext.SetActive(true);
            runnerName.text        = runner.GetRunnerName();
            runnerDescription.text = runner.GetBio();
            currentCardCarosel     = runnerCardCarosel;
            currentInventoryList   = runnerInventoryList;
            foreach (LoadoutSlotBtn button in runnerLoadoutSlotBtns)
            {
                button.SetupButton();
            }
            break;

        case Item.HackerRunner.Hacker:
            runnerContext.SetActive(false);
            hackerContext.SetActive(true);
            hackerName.text        = hacker.GetName();
            hackerDescription.text = hacker.GetBio();
            currentCardCarosel     = hackerCardCarosel;
            SetupActiveHackerSlots();
            currentInventoryList = hackerInventoryList;
            break;
        }

        currentCardCarosel.InitializeToggle();
        SetupInventoryList();
    }
Beispiel #2
0
    private void SetupCardCarosel()
    {
        currentCardCarosel.ClearCardList();
        currentCardCarosel.InitializeToggle();
        List <int> cardIds = new List <int>();

        if (item.GetHackerOrRunner() == Item.HackerRunner.Runner)
        {
            RunnerMod runnerMod = item as RunnerMod;
            cardIds.AddRange(runnerMod.GetCardIds());
        }
        else
        {
            HackerModChip hackerInstall = item as HackerModChip;
            cardIds.AddRange(hackerInstall.GetCardIds());
        }
        foreach (int id in cardIds)
        {
            Card card = Resources.Load <Card>("CardPrefabs/Player/Card" + id);
            currentCardCarosel.AddCardToList(card);
        }
        currentCardCarosel.GenerateListItems();
    }