private void Serve() { #region Checks if (currentCustomer == null) { return; } if (currentTask != PlayerTask.Delivery) { return; } var salad = (ISalad)playerInventory.GetItem(); if (salad == null) { Debug.Log("Cannot server anything other than salad to customers right now..."); return; } #endregion if (currentCustomer.Service(salad, gameObject.tag)) { playerHUD.DropSalad(); playerInventory.RemoveItem(); currentTask = PlayerTask.None; } }
public IItem GetItem() { var item = plateInventory.GetItem(); if (item != null) { plateInventory.RemoveItem(); UpdateSprite(null); return(item); } else { return(null); } }