Example #1
0
 void Awake()
 {
     if (instance != null)
     {
         Debug.Log("More than one chest inventory manager instance found!");
     }
     instance = this;
 }
Example #2
0
    // Use this for initialization
    void Start()
    {
        inventoryUI           = InventoryUI.instance;
        chestInventoryManager = ChestInventoryManager.instance;

        chestInventoryManager.onChestItemChangedCallback += UpdateUI;

        slots = itemsParent.GetComponentsInChildren <InventorySlot>();

        DefineSlotIndexes();
    }