Class Ingredient
- java.lang.Object
-
- cs.eng1.piazzapanic.food.ingredients.Ingredient
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
isChopped
protected boolean
isCooked
protected FoodTextureManager
textureManager
-
Constructor Summary
Constructors Constructor Description Ingredient(java.lang.String type, FoodTextureManager textureManager)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Ingredient[]
arrayFromString(java.lang.String csvIngredientNames, FoodTextureManager textureManager)
Initialize an array of ingredients based on the input string.static Ingredient
fromString(java.lang.String ingredientName, FoodTextureManager textureManager)
Initialize an Ingredient based on a string nameboolean
getIsChopped()
boolean
getIsCooked()
com.badlogic.gdx.graphics.Texture
getTexture()
FoodTextureManager
getTextureManager()
java.lang.String
getType()
void
setIsChopped(boolean value)
void
setIsCooked(boolean value)
java.lang.String
toString()
-
-
-
Field Detail
-
textureManager
protected final FoodTextureManager textureManager
-
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 classjava.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()
-
getTextureManager
public FoodTextureManager getTextureManager()
-
-