Beispiel #1
0
    public void RpcCustomerWaitsForTooLong()
    {
        TriggerCustomerCollider(false, false);
        CustomerFeedbackScript.PlayAngryPFX();
        CustomerFeedbackScript.CustomerLeaves();

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

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


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