public override void OnReceiveIngredient(IPickable pickable) { if (currentKitchenItemHolding != null) { return; } if (!(pickable is ICortable)) { return; } pickable.MoveTo(this); currentKitchenItemHolding = pickable; }
public override void OnReceiveIngredient(IPickable pickable) { if (!(pickable is Ingredient)) { return; } Ingredient ingredient = pickable as Ingredient; if (!_currentRecipe.Any()) { CreateDish(); } _currentPreparedDish.AddIngredient(ingredient.CurrentIngredientData); pickable.MoveTo(null); orderViewUI.SetIngredientImage(ingredient.CurrentIngredientData.grabbedImage); _currentRecipe.Add(ingredient.CurrentIngredientData); pickable.Delete(); }
public override void OnReceiveIngredient(IPickable pickable) { if (!(pickable is IEntregable)) { return; } bool isGood = true; pickable.MoveTo(this); pickable.Delete(); IEntregable entregable = pickable as IEntregable; List <IngredientData> auxIngredientList = entregable.GetIngredientsInOrder(); if (!auxIngredientList.SequenceEqual(_currentRecipe.ingredients)) { isGood = false; } CheckOrder(isGood); }
public override void OnReceiveIngredient(IPickable pickable) { pickable.MoveTo(this); pickable.Delete(); }