Class HealthBottle
java.lang.Object
dev.mikita.darkforest.core.sprite.ASprite
dev.mikita.darkforest.model.entity.Item.AItem
dev.mikita.darkforest.model.entity.Item.bottle.HealthBottle
The type Health bottle.
A class representing health bottles.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionHealthBottle
(int id, String name, double health) Instantiates a new Health bottle. -
Method Summary
Methods inherited from class dev.mikita.darkforest.model.entity.Item.AItem
drop, getId, getName, take
Methods inherited from class dev.mikita.darkforest.core.sprite.ASprite
getCollisionBox, getHeight, getImage, getPositionX, getPositionY, getWidth, intersectsCollisionBox, render, setImage, setImage, setPosition, update
-
Constructor Details
-
HealthBottle
Instantiates a new Health bottle.- Parameters:
id
- the idname
- the namehealth
- the health
-
-
Method Details
-
use
Use.A method that allows a character to use a bottle.
- Parameters:
player
- The player who uses the bottle.
-
getHealth
public double getHealth()The health.- Returns:
- The amount of health that the bottle restores.
-