//check that the order being served to them is correct public bool CheckOrder(GameObject servedFood) { //get current customer moood CustomerPatienceScript.CheckCustomerMood(); OrderScript servedFoodScript = servedFood.GetComponent <OrderScript>(); //Debug.Log("Checking if food served to customer is correct"); if (servedFoodScript.DishLabel == customersOrder.ChickenRiceLabel) { //stop customer's patience meter TriggerPatienceMeter(false); //animate the customer eating EatingFood(servedFood, servedFoodScript); TriggerCustomerCollider(false, false); return(true); } else { WrongCustomer(); return(false); } }
public void RpcWrongCustomer() { //play angry anim CustomerFeedbackScript.PlayAngryPFX(); CustomerFeedbackScript.WrongOrderServed(); CustomerPatienceScript.DecreasePatience(CustomerPatienceStats.angryPatienceDecrease); //reduce patience }
public void RpcEatingFood() { CustomerPatienceScript.StopOrderPenaltyTimer(); //play right order feedback CustomerFeedbackScript.RightOrderServed(); //play customer happy anim CustomerFeedbackScript.PlayHappyPFX(); //disable the order icon orderIconPos.gameObject.SetActive(false); //may delete later, depending on if clients get this CustomerFeedbackScript.PlayEatingPFX(); CustomerAnimScript.StartEatingAnim(); //eat for customerEatingDuration amount of time TriggerCustomerCollider(false, false); Invoke("CustomerFinishedFood", CustomerPatienceStats.customerEatingDuration); }
//when customer waits too long for their order, they will sit angrily public void SitAngrily() { CustomerPatienceScript.StartOrderPenaltyTimer(); }