예제 #1
0
    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();
        }
    }
예제 #2
0
 public bool Contains(SushiPiece.PieceType piece)
 {
     return(recipe.Contains(piece));
 }