/// <summary> /// transfers the food data to one Ingredient to another, also calling the animation code in the starting Ingredient /// </summary> /// <returns></returns> public IEnumerator Impile() { if (isSwiping) { ResetIngredients(); yield return(null); } else { if (targetIngredient.ActualID < 0) { ResetIngredients(); OnActionCanceled(); yield return(null); } else { isSwiping = true; /*yield return StartCoroutine(*/ selectedIngredient.MoveIngredients(targetIngredient) /*)*/; while (selectedIngredient.ingredientsPile.Count != 0) { targetIngredient.ingredientsPile.Push(selectedIngredient.ingredientsPile.Pop()); } if (targetIngredient.CheckVictory(totalIngredients)) { ShowVictory(true); } } } ResetIngredients(); isSwiping = false; }