Exemple #1
0
 public void RpcWrongCustomer()
 {
     //play angry anim
     CustomerFeedbackScript.PlayAngryPFX();
     CustomerFeedbackScript.WrongOrderServed();
     CustomerPatienceScript.DecreasePatience(CustomerPatienceStats.angryPatienceDecrease);
     //reduce patience
 }
Exemple #2
0
    public void RpcCustomerWaitsForTooLong()
    {
        TriggerCustomerCollider(false, false);
        CustomerFeedbackScript.PlayAngryPFX();
        CustomerFeedbackScript.CustomerLeaves();

        CustomerAnimScript.LeaveAnim();
        Destroy(this.gameObject, 1f);
    }
Exemple #3
0
    public void RpcSpawnDirtyDish(GameObject dirtyDish)
    {
        dirtyDish.GetComponent <DirtyDishScript>().SetTableScript(tableSeatedAt);

        dirtyDish.layer = LayerMask.NameToLayer("TableItem");


        CustomerFeedbackScript.PlayEatingPFX(false);
        CustomerAnimScript.StopEatingAnim();
    }
Exemple #4
0
    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);
    }
Exemple #5
0
    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);
        }
    }
Exemple #6
0
    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);
    }