FoodData
Importing the class
If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.
Members
addExhaustion(exhaustion as float)
Adds exhaustion to the entity.
Parameters:
exhaustion: float
Type: float
- The amount of exhaustion to add. eat(foodLevelModifier as int, saturationLevelModifier as float)
Replenishes the food level and saturation level.
Parameters:
foodLevelModifier: int
Type: int
- The amount to modify the food level by. saturationLevelModifier: float
Type: float
- The amount to modify the saturation level by. eat(foodProperties as FoodProperties)
Replenishes the food level and saturation level.
Parameters:
getExhaustionLevel() as float
Gets the exhaustion level.
Returns: The exhaustion level.
Return Type:
float
getFoodLevel() as int
Gets the food level.
Returns: The food level.
Return Type:
int
getLastFoodLevel() as int
Gets the last food level.
Returns: The last food level.
Return Type:
int
getSaturationLevel() as float
Gets the saturation level.
Returns: The saturation level.
Return Type:
float
needsFood() as bool
Checks if the entity needs food.
Returns: True if the entity needs food, false otherwise.
Return Type:
bool
setExhaustion(exhaustionLevel as float)
Sets the exhaustion level.
Parameters:
exhaustionLevel: float
Type: float
- The amount of exhaustion to set. setFoodLevel(foodLevel as int)
Sets the food level.
Parameters:
foodLevel: int
Type: int
- The amount of food to set. setSaturation(saturationLevel as float)
Sets the saturation level.
Parameters:
saturationLevel: float
Type: float
- The amount of saturation to set.