コード例 #1
0
    private void OnTriggerEnter(Collider other)
    {
        Debug.Log("on trigger enter: " + other.gameObject.name);
        if (other.gameObject.CompareTag(PlateableTag) && plateOccupiedBy == null)
        {
            VR_OrderSlipBehaviour   orderSlipBehaviour   = other.gameObject.GetComponent <VR_OrderSlipBehaviour>();
            VR_IngredientProperties ingredientProperties = other.gameObject.GetComponent <VR_IngredientProperties>();

            if (orderSlipBehaviour != null)
            {
                plateOccupiedBy = other.gameObject;

                if (DishEvaluationScript.CheckCorrespondingOrderSlip(orderSlipBehaviour.OrderSlipOrder) || isDebug)
                {
                    ToggleServingTrigger(true);
                    DishFeedbackScript.CorrectDish();
                }
            }
            else if (ingredientProperties != null)
            {
                plateOccupiedBy = other.gameObject;

                PlateIngredientTrigger.SetActive(true);
            }
        }
    }
コード例 #2
0
 public void CanBeMoulded(VR_IngredientProperties _ingredientProperties)
 {
     if (_ingredientProperties.CheckCanPerformStep(PreparationType.Moulding) >= 0)
     {
         //if moulded before or
     }
 }
コード例 #3
0
    private void OnTriggerEnter(Collider other)
    {
        VR_IngredientProperties ingredientProperties = other.gameObject.GetComponent <VR_IngredientProperties>();

        if (ingredientProperties != null)
        {
            CanBeCooked(ingredientProperties);
        }
    }
コード例 #4
0
    private void OnTriggerExit(Collider other)
    {
        if (other.gameObject == plateOccupiedBy)
        {
            VR_OrderSlipBehaviour   orderSlipBehaviour   = other.gameObject.GetComponent <VR_OrderSlipBehaviour>();
            VR_IngredientProperties ingredientProperties = other.gameObject.GetComponent <VR_IngredientProperties>();

            if (orderSlipBehaviour != null)
            {
                ToggleServingTrigger(false);
            }
            else if (ingredientProperties != null)
            {
                TogglePlatingTrigger(false);
            }

            plateOccupiedBy = null;
        }
    }
コード例 #5
0
 public void CanBeCooked(VR_IngredientProperties _ingredientProperties)
 {
     if (_ingredientProperties.NeedCooked) //if it needs to be cooked,
     {
     }
 }