Exemplo n.º 1
0
    private Ingredient(EnumIngredients aliment, string name, IngredientCategory category,
	                   string backgroundSpriteName, string ingredientSpriteName, string ingredientBottomSpriteName)
    {
        this.Aliment = aliment;
        m_name = name;
        m_category = category;
        m_backgroundSpriteName = backgroundSpriteName;
        m_ingredientSpriteName = ingredientSpriteName;
        m_ingredientShadowSpriteName = m_ingredientSpriteName.Replace(".png", "_shadow.png"); ;
        m_ingredientBottomSpriteName = ingredientBottomSpriteName ?? ingredientSpriteName;
    }
Exemplo n.º 2
0
    public static Ingredient FindIngredient(EnumIngredients enumIngredients)
    {
        foreach (Ingredient ingredient in Ingredients)
        {
            if (ingredient.Aliment == enumIngredients)
                return ingredient;
        }

        return null;
    }