public void RpcWrongCustomer() { //play angry anim CustomerFeedbackScript.PlayAngryPFX(); CustomerFeedbackScript.WrongOrderServed(); CustomerPatienceScript.DecreasePatience(CustomerPatienceStats.angryPatienceDecrease); //reduce patience }
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 RpcGenerateOrder(bool roastedChic, bool ricePlain, bool haveEgg) { CustomerFeedbackScript.PlayHappyPFX(); CustomerPatienceScript.CustomerState = CustomerPatienceScript.CustomerOrdering; customersOrder = orderGenerationScript.CreateCustomOrder(roastedChic, ricePlain, haveEgg); if (customersOrder.OrderIcon != null) { //instantiate the order icon as the child of the orderIconPos obj GameObject orderIcon = Instantiate(customersOrder.OrderIcon, orderIconPos); //GameManager.Instance.chickenRiceOrders.Add(customersOrder); //NetworkServer.Spawn(orderIcon); } }
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); }