Class Ingredient

    • Field Detail

      • isCooked

        protected boolean isCooked
      • isChopped

        protected boolean isChopped
    • Constructor Detail

      • Ingredient

        public Ingredient​(java.lang.String type,
                          FoodTextureManager textureManager)
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • fromString

        public static Ingredient fromString​(java.lang.String ingredientName,
                                            FoodTextureManager textureManager)
        Initialize an Ingredient based on a string name
        Parameters:
        ingredientName - the name of the ingredient which can be defined from Tiled
        Returns:
        the Ingredient of the type defined by the input
      • arrayFromString

        public static Ingredient[] arrayFromString​(java.lang.String csvIngredientNames,
                                                   FoodTextureManager textureManager)
        Initialize an array of ingredients based on the input string.
        Parameters:
        csvIngredientNames - A string containing a list of ingredient names seperated by commas with no whitespace as defined in Tiled
        Returns:
        An array of Ingredient based on the input string
      • getType

        public java.lang.String getType()
      • getTexture

        public com.badlogic.gdx.graphics.Texture getTexture()
      • setIsCooked

        public void setIsCooked​(boolean value)
      • getIsCooked

        public boolean getIsCooked()
      • setIsChopped

        public void setIsChopped​(boolean value)
      • getIsChopped

        public boolean getIsChopped()