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); } } }
public void CanBeMoulded(VR_IngredientProperties _ingredientProperties) { if (_ingredientProperties.CheckCanPerformStep(PreparationType.Moulding) >= 0) { //if moulded before or } }
private void OnTriggerEnter(Collider other) { VR_IngredientProperties ingredientProperties = other.gameObject.GetComponent <VR_IngredientProperties>(); if (ingredientProperties != null) { CanBeCooked(ingredientProperties); } }
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; } }
public void CanBeCooked(VR_IngredientProperties _ingredientProperties) { if (_ingredientProperties.NeedCooked) //if it needs to be cooked, { } }