bubolo
 All Classes Namespaces Functions Variables Enumerator
Public Member Functions | List of all members
bubolo.world.entity.concrete.Road Class Reference
Inheritance diagram for bubolo.world.entity.concrete.Road:
bubolo.world.entity.Modifier bubolo.world.entity.StationaryEntity bubolo.world.Damageable bubolo.world.entity.Entity bubolo.graphics.Drawable

Public Member Functions

 Road ()
 
 Road (UUID id)
 
Modifier setHP (int i)
 
int getHP ()
 
int getMaxHP ()
 
Modifier modifyHP (int i)
 
boolean isAlive ()
 
void destroy ()
 
Entity setParams (float x, float y, int w, int h, float rot)
 
UUID getId ()
 
void setId (UUID id)
 
int getHeight ()
 
int getWidth ()
 
void update ()
 
float getRotation ()
 
float getX ()
 
float getY ()
 
Entity setRotation (float newRotation)
 
Entity setX (float x)
 
Entity setY (float y)
 
Entity setWidth (int size)
 
Entity setHeight (int size)
 

Detailed Description

Roads are Modifiers for Terrain that allow Tanks to drive more quickly. They can be created and destroyed by Tanks.

Author
BU CS673 - Clone Productions

Definition at line 14 of file Road.java.

Constructor & Destructor Documentation

bubolo.world.entity.concrete.Road.Road ( )

Construct a new Road with a random UUID.

Definition at line 24 of file Road.java.

bubolo.world.entity.concrete.Road.Road ( UUID  id)

Construct a new Road with the specified UUID.

Parameters
idis the existing UUID to be applied to the new Road.

Definition at line 35 of file Road.java.

Member Function Documentation

void bubolo.world.entity.Modifier.destroy ( )
inherited

Destroy this Damageable and clean up any remaining assets.

Implements bubolo.world.Damageable.

Definition at line 76 of file Modifier.java.

int bubolo.world.entity.Entity.getHeight ( )
inherited

Get the height of this Entity.

Returns
the height of this Entity in world coordinates.

Implements bubolo.graphics.Drawable.

Definition at line 88 of file Entity.java.

int bubolo.world.entity.Modifier.getHP ( )
inherited

Get the current HP value for this Damageable.

Returns
an int representing the current HP value.

Implements bubolo.world.Damageable.

Definition at line 48 of file Modifier.java.

UUID bubolo.world.entity.Entity.getId ( )
inherited

The Entity's unique id.

Returns
the Entity's unique id.

Definition at line 73 of file Entity.java.

int bubolo.world.entity.Modifier.getMaxHP ( )
inherited

Get the max HP value for this Damageable.

Returns
an int representing the maximum HP value.

Implements bubolo.world.Damageable.

Definition at line 55 of file Modifier.java.

float bubolo.world.entity.Entity.getRotation ( )
inherited

Get the current rotation of this Entity.

Returns
the rotation of this Entity in radians.

Implements bubolo.graphics.Drawable.

Definition at line 110 of file Entity.java.

int bubolo.world.entity.Entity.getWidth ( )
inherited

Get the width of this Entity.

Returns
the height of this Entity in world coordinates.

Implements bubolo.graphics.Drawable.

Definition at line 94 of file Entity.java.

float bubolo.world.entity.Entity.getX ( )
inherited

Get the x position of this Entity.

Returns
the entity's x position in world coordinates.

Implements bubolo.graphics.Drawable.

Definition at line 116 of file Entity.java.

float bubolo.world.entity.Entity.getY ( )
inherited

Get the y position of this Entity.

Returns
the entity's y position in world coordinates.

Implements bubolo.graphics.Drawable.

Definition at line 122 of file Entity.java.

boolean bubolo.world.entity.Modifier.isAlive ( )
inherited

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'.

Implements bubolo.world.Damageable.

Definition at line 69 of file Modifier.java.

Modifier bubolo.world.entity.Modifier.modifyHP ( int  i)
inherited

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.

Implements bubolo.world.Damageable.

Definition at line 62 of file Modifier.java.

Entity bubolo.world.entity.Entity.setHeight ( int  size)
inherited

Set this Entity's height.

Parameters
sizeis the desired Entity height in world coordinates.
Returns
this Entity.

Definition at line 187 of file Entity.java.

Referenced by bubolo.world.entity.Entity.setParams().

Modifier bubolo.world.entity.Modifier.setHP ( int  i)
inherited

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.

Implements bubolo.world.Damageable.

Definition at line 42 of file Modifier.java.

void bubolo.world.entity.Entity.setId ( UUID  id)
inherited

Sets the Entity's unique id.

Parameters
idthe Entity's unique id.

Definition at line 82 of file Entity.java.

Entity bubolo.world.entity.Entity.setParams ( float  x,
float  y,
int  w,
int  h,
float  rot 
)
inherited

Set the basic parameters for an Entity. Intended to be used after construction.

Parameters
xis the initial x position in world coordinates.
yis the initial y position in world coordinates.
wis the initial width in world coordinates.
his the initial height in world coordinates.
rotis the initial rotation in radians.
Returns
a reference to this Entity.

Definition at line 59 of file Entity.java.

References bubolo.world.entity.Entity.setHeight(), bubolo.world.entity.Entity.setRotation(), bubolo.world.entity.Entity.setWidth(), bubolo.world.entity.Entity.setX(), and bubolo.world.entity.Entity.setY().

Entity bubolo.world.entity.Entity.setRotation ( float  newRotation)
inherited

Set the rotation of this Entity.

Parameters
newRotationis the desired rotation state of this Entity in radians.
Returns
this Entity, after the rotation action has been completed.

Definition at line 134 of file Entity.java.

Referenced by bubolo.world.entity.Entity.setParams().

Entity bubolo.world.entity.Entity.setWidth ( int  size)
inherited

Set this Entity's width.

Parameters
sizeis the desired Entity width in world coordinates.
Returns
this Entity.

Definition at line 174 of file Entity.java.

Referenced by bubolo.world.entity.Entity.setParams().

Entity bubolo.world.entity.Entity.setX ( float  x)
inherited

Sets this Entity's x position.

Parameters
xis the desired x position in world coordinates.
Returns
this Entity.

Definition at line 148 of file Entity.java.

Referenced by bubolo.world.entity.Entity.setParams().

Entity bubolo.world.entity.Entity.setY ( float  y)
inherited

Set this Entity's y position.

Parameters
yis the desired y position in world coordinates.
Returns
this Entity.

Definition at line 161 of file Entity.java.

Referenced by bubolo.world.entity.Entity.setParams().

void bubolo.world.entity.Entity.update ( )
inherited

Updates the state of this Entity. Called multiple times per second to maintain current Entity state.

Definition at line 104 of file Entity.java.