private int CheckSameDrink(Drink drink_) { for (int loop = 5; loop < Config.inventoryRow * Config.inventoryCol; loop++) { if(drink[loop] == null)continue; if(drink[loop].GetDrinkCode() == drink_.GetDrinkCode()){ drink[loop].SetCount(drink[loop].GetCount() + 1); UI_Control.AddLog(drink_.GetName() + "을(를) 획득하였다."); return loop; } } return -1; }
public void AddDrink(Drink drink, int index) { slot_drink.GetComponent<UI_SlotHoldingDrink> ().AddToSlot (drink.GetDrinkCode(), drink.GetSprite(), index); }