Esempio n. 1
0
        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;
            }
        }
Esempio n. 2
0
        public IItem GetItem()
        {
            var item = plateInventory.GetItem();

            if (item != null)
            {
                plateInventory.RemoveItem();
                UpdateSprite(null);
                return(item);
            }
            else
            {
                return(null);
            }
        }