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); } } }
private void TogglePlatingTrigger(bool enable) { PlateIngredientTrigger.SetActive(enable); if (!enable) { DishFeedbackScript.DisableEffects(); } }