protected virtual void InitInventory() { Slot arrowSlot = new Slot(ConsumableType.Arrow, GameConfig.arrowInventorySize); arrowSlot.StockItem = GameConfig.initialArrows; Slot bombSlot = new Slot(ConsumableType.Bomb, GameConfig.smokeBombInvertorySize); bombSlot.StockItem = GameConfig.initialBombs; CharacterInventoryComponent characterInventory = RequestComponent <CharacterInventoryComponent>(); characterInventory.AddSlot(arrowSlot); characterInventory.AddSlot(bombSlot); }
private void Start() { inventoryComponent = inventoryCarrier.RequestComponent <CharacterInventoryComponent>(); }