public void SetText(Item newItem, ItemDetailsMenu.ItemDetailMenuContextType newContext)
    {
        context        = newContext;
        item           = newItem;
        itemName.text  = item.GetItemName();
        itemType.text  = item.GetItemTypeForDisplay();
        itemLevel.text = item.GetItemLevel() + "/" + item.GetItemMaxLevel();

        switch (context)
        {
        default:
            if (IsItemEquipped())
            {
                Color tempColor = runnerOrHackerIcon.color;
                tempColor.a = 1f;
                runnerOrHackerIcon.color  = tempColor;
                runnerOrHackerIcon.sprite = GetRunnerOrHackerIcon();
            }
            else
            {
                Color tempColor = runnerOrHackerIcon.color;
                tempColor.a = 0f;
                runnerOrHackerIcon.color = tempColor;
            }
            break;
        }
    }
 public void CloseLoadoutMenu()
 {
     hubWorldSFX.PlayHubSoundEffect(HubWorldSFX.HubSoundeffect.ButtonPress);
     gameObject.SetActive(false);
     if (context == ItemDetailsMenu.ItemDetailMenuContextType.JobSelect)
     {
         context = ItemDetailsMenu.ItemDetailMenuContextType.Inventory;
         jobSelectMenu.SetupMenu();
     }
 }
Ejemplo n.º 3
0
    public InventoryListItem AddItemToList(Item item, ItemDetailsMenu.ItemDetailMenuContextType context)
    {
        InventoryListItem listItem = Instantiate(itemTemplate);

        listItem.gameObject.SetActive(true);

        listItem.GetComponent <InventoryListItem>().SetText(item, context);
        listItem.transform.SetParent(itemTemplate.transform.parent, false);

        return(listItem);
    }
 public void SetupUpgradesMenu(ItemDetailsMenu.ItemDetailMenuContextType newContext, Item newItem)
 {
     context = newContext;
     item    = newItem;
     if (item.GetHackerOrRunner() == Item.HackerRunner.Runner)
     {
         SetupRunnerMenu();
     }
     else
     {
         SetupHackerMenu();
     }
 }
    public void SetupInventoryList(InventoryMenu.InventoryFields[] newHeaders, List <Item> itemsToList, ItemDetailsMenu.ItemDetailMenuContextType newContext)
    {
        context = newContext;
        if (sortBy == InventoryMenu.InventoryFields.None)
        {
            sortBy = newHeaders[0];
        }

        headers = newHeaders;
        items   = itemsToList;
        RefreshHeaders();
        items.Sort(SortComparator);
        ListItemData();
        detailsButton.interactable = false;
    }
 public void SetupLoadoutMenu(ItemDetailsMenu.ItemDetailMenuContextType newContext)
 {
     context = newContext;
     SetupLoadoutMenu();
 }