Ejemplo n.º 1
0
    public void sit(GameObject customer)
    {
        occupingCustomer       = customer;
        ssRef.myParentCustomer = customer;

        ssRef.toggleSlider();

        patienceBar.gameObject.SetActive(true);


        status = (int)Status.OCCUPIED;
        timer  = 0.0f;
        customer.transform.parent   = chair.transform;
        customer.transform.position = chair.transform.position;
        customer.transform.rotation = chair.transform.rotation;
    }
Ejemplo n.º 2
0
 void Update()
 {
     if (movingToTable)
     {
         if (nav.enabled && nav.remainingDistance < 10)
         {
             customerAnimator.SetBool("walking", false);
             nav.enabled = false;
             myTable.GetComponent <tableScript>().sit(this.gameObject);
             ssRef.toggleSlider();
         }
     }
     if (!movingToTable && nav.enabled && status != Status.LEAVING && nav.remainingDistance < 2)
     {
         nav.enabled = false;
         customerAnimator.SetBool("walking", false);
     }
 }