InformationInventorySlot[] slots;          // List of all the slots

    void Start()
    {
        Informationinventory = InformationInventory.instance;
        Informationinventory.onItemChangedCallback += UpdateUI;            // Subscribe to the onItemChanged callback


        //Populate our slots array
        slots = itemsParent.GetComponentsInChildren <InformationInventorySlot>();
    }
Exemplo n.º 2
0
    void Awake()
    {
        if (instance != null)
        {
            Debug.LogWarning("More than one instance of Inventory found!");
            return;
        }

        instance = this;
    }