override public bool canAcceptFood(FoodProperty property) { if (property.GetPropertyBool(FoodProperty.PropertyBool.Oriental) == true) { return(true); } return(false); }
override public bool canAcceptFood(FoodProperty property) { if (property.GetProperty(FoodProperty.Property.Warmth) >= 7) { return(true); } return(false); }
override public bool canAcceptFood(FoodProperty property) { if (property.GetPropertyBool(FoodProperty.PropertyBool.Vegetables) == true && property.GetProperty(FoodProperty.Property.Greasiness) >= 5) { return(true); } return(false); }
// 食品を受け取って評価する public void TakeFood(FoodProperty property) { if (this.GetComponent <FoodRequirement>().canAcceptFood(property)) { commentText.text = property.GetName() + " うん、おいしい!"; Destroy(gameObject); } else { commentText.text = property.GetName() + " なにこれ?"; } }
// 最後にお皿に乗った食材を提供する(プロパティを渡す) public void Serve() { if (food == null) { return; } FoodProperty property = food.GetComponent <FoodProperty>(); customer.TakeFood(property); food = null; return; }
virtual public bool canAcceptFood(FoodProperty property) { return(true); }