public void RpcCustomerWaitsForTooLong() { TriggerCustomerCollider(false, false); CustomerFeedbackScript.PlayAngryPFX(); CustomerFeedbackScript.CustomerLeaves(); CustomerAnimScript.LeaveAnim(); Destroy(this.gameObject, 1f); }
public void RpcSpawnDirtyDish(GameObject dirtyDish) { dirtyDish.GetComponent <DirtyDishScript>().SetTableScript(tableSeatedAt); dirtyDish.layer = LayerMask.NameToLayer("TableItem"); CustomerFeedbackScript.PlayEatingPFX(false); CustomerAnimScript.StopEatingAnim(); }
public void RpcLeaveRestaurant(bool isCustomerAngry) { if (isCustomerAngry) { CustomerFeedbackScript.PlayAngryPFX(); tableSeatedAt.GetComponent <TableFeedback>().CustomerLeaves(); } tableSeatedAt.GetComponent <CustomerPatience>().ResetCustomerPatience(); TableColliderManager.Instance.ToggleTableDetection(false); CustomerAnimScript.LeaveAnim(); Destroy(this.gameObject, 1f); }
public void RpcDisplayOrderAndWait() { CustomerPatienceScript.CustomerState = CustomerPatienceScript.CustomerWaiting; CustomerAnimScript.WaitForFoodAnim(); //display the customer's order orderIconPos.gameObject.SetActive(true); //enable their collider TriggerCustomerCollider(true, true); //if the customer waits too long for their food, they will SitAngrily() TriggerPatienceMeter(true, CustomerPatienceStats.CustomerPatience_FoodWait, SitAngrily); }
//---------------------BEHAVIOUR WHEN SEATED--------------------- #region Just Seated //when customer has been brought to a table with enough seats, this method is called public void CustomerJustSeated(TableScript tableScript) { //assign the table the customer is seated at as their table tableSeatedAt = tableScript; //animate the customer sitting down and browsing menu CustomerAnimScript.SitDownAnim(); CustomerAnimScript.BrowseMenuAnim(); //Debug.Log("Animating customer sitting and browsing menu"); if (isServer) { //RpcCustomerJustSeated(); //generate the customer's order GenerateOrder(); } }
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); }