public void CollectPiece(SushiPiece.PieceType piece) { if (piece == SushiPiece.PieceType.ginger) { Fail(); return; } if (currentRecipe.Contains(piece)) { print("Collected: " + piece); currentRecipe.recipe.Remove(piece); UpdateUI(); if (currentRecipe.recipe.Count < 1) { gameManager.SushiCompleted(currentRecipe); ChooseNewRecipe(); } } else { Fail(); } }
public bool Contains(SushiPiece.PieceType piece) { return(recipe.Contains(piece)); }