Class ConsumableItem
java.lang.Object
me.fami6xx.rpuniverse.core.basicneeds.ConsumableItem
This class represents a consumable item in the game.
Each consumable item has a food, water, health, poop, and pee value.
-
Constructor Summary
ConstructorsConstructorDescriptionConsumableItem(int food, int water, int health, int poop, int pee)Constructs a new ConsumableItem with the given values. -
Method Summary
Modifier and TypeMethodDescriptionintgetFood()Returns the food value of the item.intReturns the health value of the item.intgetPee()Returns the pee value of the item.intgetPoop()Returns the poop value of the item.intgetWater()Returns the water value of the item.intsetFood(int food)Sets the food value of the item and returns the new value.intsetHealth(int health)Sets the health value of the item and returns the new value.intsetPee(int pee)Sets the pee value of the item and returns the new value.intsetPoop(int poop)Sets the poop value of the item and returns the new value.intsetWater(int water)Sets the water value of the item and returns the new value.
-
Constructor Details
-
ConsumableItem
public ConsumableItem(int food, int water, int health, int poop, int pee)Constructs a new ConsumableItem with the given values.- Parameters:
food- the food value of the itemwater- the water value of the itemhealth- the health value of the itempoop- the poop value of the itempee- the pee value of the item
-
-
Method Details
-
getFood
public int getFood()Returns the food value of the item.- Returns:
- the food value
-
setFood
public int setFood(int food)Sets the food value of the item and returns the new value.- Parameters:
food- the new food value- Returns:
- the new food value
-
getWater
public int getWater()Returns the water value of the item.- Returns:
- the water value
-
setWater
public int setWater(int water)Sets the water value of the item and returns the new value.- Parameters:
water- the new water value- Returns:
- the new water value
-
getHealth
public int getHealth()Returns the health value of the item.- Returns:
- the health value
-
setHealth
public int setHealth(int health)Sets the health value of the item and returns the new value.- Parameters:
health- the new health value- Returns:
- the new health value
-
getPoop
public int getPoop()Returns the poop value of the item.- Returns:
- the poop value
-
setPoop
public int setPoop(int poop)Sets the poop value of the item and returns the new value.- Parameters:
poop- the new poop value- Returns:
- the new poop value
-
getPee
public int getPee()Returns the pee value of the item.- Returns:
- the pee value
-
setPee
public int setPee(int pee)Sets the pee value of the item and returns the new value.- Parameters:
pee- the new pee value- Returns:
- the new pee value
-