public void GetStockFromShelf(ShelfContainer shelf) { StockTypes stockType = shelf.ShelfStockType; int amount = shelf.GetStock(); if (amount != 0) { GameObject newItem = Object.Instantiate(stateMachine.mapManager.GetStockTypePrefab(stockType)) as GameObject; EquipItem(newItem.transform); } }
public void GetStockFromShelf(ShelfContainer shelf) { StockTypes stockType = shelf.ShelfStockType; int amount = shelf.GetStock(); if (amount == 0) { return; } GameObject newItem = Instantiate(mapManager.GetStockTypePrefab(stockType)); EquipItem(newItem.transform); }