예제 #1
0
        // We set up all of the variables needed for the link menu
        private void InitializeLinkMenu()
        {
            linkMenuObject.SetActive(true);
            currentMenuParent = linkMenuObject.transform.GetChild(0).GetChild(0).GetChild(0);

            int currLinkIndex = 0;

            while (currLinkIndex < playerInventory.GetLinkInventorySize())
            {
                LinkData currCharacter = playerInventory.GetLinkAtIndex(currLinkIndex).SpecifiedLink;
                currentMenuParent.GetChild(currLinkIndex).GetComponent <TextMeshProUGUI>().text = currCharacter.linkName;
                ++currLinkIndex;
            }
            // For the rest of the items in the list, we clear them from the screen
            while (currLinkIndex < currentMenuParent.childCount)
            {
                currentMenuParent.GetChild(currLinkIndex).GetComponent <TextMeshProUGUI>().text = "";
                ++currLinkIndex;
            }

            currentState = MenuStates.LINK;
        }
예제 #2
0
 public InventoryLink(LinkData newLink)
 {
     this.specifiedLink = newLink;
 }