Beispiel #1
0
    //Item Menu Controls

    public void InspectItem(int index)
    {
        if (index == currentItem)
        {
            itemPreview.SetActive(false);
            currentItem = -1;
        }
        else if (itemButtons[index].transform.GetChild(0).gameObject.activeSelf)
        {
            itemPreview.transform.GetChild(0).GetChild(0).gameObject.GetComponent <Image>().sprite = dhScript.GetItemStatus(index).image;
            itemPreview.transform.GetChild(1).GetChild(0).gameObject.GetComponent <Text>().text    = dhScript.GetItemStatus(index).description;

            itemPreview.SetActive(true);
            currentItem = index;
        }
    }