Пример #1
0
    public void Check()
    {
        bool tip = true;

        foreach (string ingredient in glass.contents)
        {
            if (!order.current.ingredients.Contains(ingredient))
            {
                tip = false;
                Debug.LogFormat("Extra ingredient {0}!", ingredient);
            }
        }

        foreach (string ingredient in order.current.ingredients)
        {
            if (!glass.contents.Contains(ingredient))
            {
                tip = false;
                Debug.LogFormat("Missing ingredient {0}!", ingredient);
            }
        }

        if (tip)
        {
            Debug.Log("TIP!");
        }
        else
        {
            Debug.Log("No tip!");
        }

        order.RandomOrder();
        glass.Empty();
    }
Пример #2
0
    public void Respawn()
    {
        rigidbody.Sleep();
        transform.position = respawnLoc.transform.position;
        transform.rotation = startRot;

        // Glass
        Glass glass = GetComponent <Glass>();

        if (glass != null)
        {
            glass.Empty(0f);
            glass.SetIce(0f);
            glass.lemonSlice.SetActive(false);
            glass.limeSlice.SetActive(false);
        }
    }