bubolo
 All Classes Namespaces Functions Variables Enumerator
Public Member Functions | List of all members
bubolo.world.Damageable Interface Reference
Inheritance diagram for bubolo.world.Damageable:
bubolo.world.entity.Actor bubolo.world.entity.Modifier bubolo.world.entity.StationaryElement bubolo.world.entity.concrete.Tank bubolo.world.entity.concrete.Road bubolo.world.entity.concrete.Tree

Public Member Functions

Damageable setHP (int i)
 
int getHP ()
 
int getMaxHP ()
 
Damageable modifyHP (int i)
 
boolean isAlive ()
 
void destroy ()
 

Detailed Description

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.

Author
BU CS673 - Clone Productions

Definition at line 10 of file Damageable.java.

Member Function Documentation

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.

Returns
an int representing the current HP value.

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.

Returns
an int representing the maximum HP value.

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.

Returns
true if the Damageable should be considered 'alive'.

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.

Parameters
iis the amount to modify this Damageable's health by. Positive values increase HP, negative values decrease.
Returns
a reference to this Damageable.

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.

Parameters
iis the value to set this Damageable's HP to.
Returns
a reference to this Damageable.

Implemented in bubolo.world.entity.StationaryElement, bubolo.world.entity.Actor, and bubolo.world.entity.Modifier.