public override void DoAction(Actor actor) { Chef chef = ((ChefActor)actor).chef; chef.isDeliveredCorrectSaladCombination.value = chef.pSelectedCustomeToDeliverSalad.GetComponent <Customer>().ReceiveSalad(chef, chef.pSaladPickedToDeliver); chef.pItemsHolder.ClearChildren(); chef.pSaladPickedToDeliver.Clear(); chef.MoveToNextState(); }
private IEnumerator ChopVegetables(Chef chef, Transform chefTransform) { Vegetable vegetable = chef.GetVegetable(); while (vegetable != null) { chefTransform.GetComponent <ChefView>().itemsHolder.GetChild(0).SetParent(chef.pUsingChoppingBoard.GetComponent <ChoppingBoard>().itemHolder); chef.pUsingChoppingBoard.GetComponent <ChoppingBoard>().itemHolder.GetComponent <TransformLayout>().ForcedUpdate(); yield return(new WaitForSeconds(m_VegetableChopTime)); PutChoppedItemInThePlate(chef, vegetable); vegetable = chef.GetVegetable(); } chef.MoveToNextState(); }