Public Member Functions | |
Damageable | setHP (int i) |
int | getHP () |
int | getMaxHP () |
Damageable | modifyHP (int i) |
boolean | isAlive () |
void | destroy () |
Interface for Entities that are able to be affected by other objects through taking damage. Outlines methods relating to getting, checking, and modifying the HP of Entities.
Definition at line 10 of file Damageable.java.
void bubolo.world.Damageable.destroy | ( | ) |
Destroy this Damageable and clean up any remaining assets.
Implemented in bubolo.world.entity.Actor, bubolo.world.entity.Modifier, and bubolo.world.entity.StationaryElement.
int bubolo.world.Damageable.getHP | ( | ) |
Get the current HP value for this Damageable.
Implemented in bubolo.world.entity.Actor, bubolo.world.entity.Modifier, and bubolo.world.entity.StationaryElement.
int bubolo.world.Damageable.getMaxHP | ( | ) |
Get the max HP value for this Damageable.
Implemented in bubolo.world.entity.Actor, bubolo.world.entity.Modifier, and bubolo.world.entity.StationaryElement.
boolean bubolo.world.Damageable.isAlive | ( | ) |
Test to see whether this Damageable should be considered 'alive' for the purposes of entity interactions.
Implemented in bubolo.world.entity.Actor, bubolo.world.entity.Modifier, and bubolo.world.entity.StationaryElement.
Damageable bubolo.world.Damageable.modifyHP | ( | int | i | ) |
Modify this Damageable's HP by the specified amount. Positive values should increase the current HP, negative values should decrease it.
i | is the amount to modify this Damageable's health by. Positive values increase HP, negative values decrease. |
Implemented in bubolo.world.entity.Actor, bubolo.world.entity.Modifier, and bubolo.world.entity.StationaryElement.
Damageable bubolo.world.Damageable.setHP | ( | int | i | ) |
Set the HP value f or this Damageable to the specified value.
i | is the value to set this Damageable's HP to. |
Implemented in bubolo.world.entity.StationaryElement, bubolo.world.entity.Actor, and bubolo.world.entity.Modifier.