Public Member Functions | |
StationaryElement () | |
StationaryElement (UUID id) | |
int | getHP () |
int | getMaxHP () |
StationaryElement | modifyHP (int i) |
StationaryElement | setHP (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) |
A StationaryElement is a StationaryEntity that can take Damage and take actions in the game world.
Definition at line 13 of file StationaryElement.java.
bubolo.world.entity.StationaryElement.StationaryElement | ( | ) |
Construct a new StationaryElement with a random UUID.
Definition at line 23 of file StationaryElement.java.
bubolo.world.entity.StationaryElement.StationaryElement | ( | UUID | id | ) |
Construct a new StationaryElement with the specified UUID.
id | is the existing UUID to be applied to the new StationaryElement. |
Definition at line 34 of file StationaryElement.java.
void bubolo.world.entity.StationaryElement.destroy | ( | ) |
Destroy this Damageable and clean up any remaining assets.
Implements bubolo.world.Damageable.
Definition at line 76 of file StationaryElement.java.
|
inherited |
Get the height of this Entity.
Implements bubolo.graphics.Drawable.
Definition at line 88 of file Entity.java.
int bubolo.world.entity.StationaryElement.getHP | ( | ) |
Get the current HP value for this Damageable.
Implements bubolo.world.Damageable.
Definition at line 41 of file StationaryElement.java.
|
inherited |
int bubolo.world.entity.StationaryElement.getMaxHP | ( | ) |
Get the max HP value for this Damageable.
Implements bubolo.world.Damageable.
Definition at line 48 of file StationaryElement.java.
|
inherited |
Get the current rotation of this Entity.
Implements bubolo.graphics.Drawable.
Definition at line 110 of file Entity.java.
|
inherited |
Get the width of this Entity.
Implements bubolo.graphics.Drawable.
Definition at line 94 of file Entity.java.
|
inherited |
Get the x position of this Entity.
Implements bubolo.graphics.Drawable.
Definition at line 116 of file Entity.java.
|
inherited |
Get the y position of this Entity.
Implements bubolo.graphics.Drawable.
Definition at line 122 of file Entity.java.
boolean bubolo.world.entity.StationaryElement.isAlive | ( | ) |
Test to see whether this Damageable should be considered 'alive' for the purposes of entity interactions.
Implements bubolo.world.Damageable.
Definition at line 69 of file StationaryElement.java.
StationaryElement bubolo.world.entity.StationaryElement.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. |
Implements bubolo.world.Damageable.
Definition at line 55 of file StationaryElement.java.
|
inherited |
Set this Entity's height.
size | is the desired Entity height in world coordinates. |
Definition at line 187 of file Entity.java.
Referenced by bubolo.world.entity.Entity.setParams().
StationaryElement bubolo.world.entity.StationaryElement.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. |
Implements bubolo.world.Damageable.
Definition at line 62 of file StationaryElement.java.
|
inherited |
Sets the Entity's unique id.
id | the Entity's unique id. |
Definition at line 82 of file Entity.java.
|
inherited |
Set the basic parameters for an Entity. Intended to be used after construction.
x | is the initial x position in world coordinates. |
y | is the initial y position in world coordinates. |
w | is the initial width in world coordinates. |
h | is the initial height in world coordinates. |
rot | is the initial rotation in radians. |
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().
|
inherited |
Set the rotation of this Entity.
newRotation | is the desired rotation state of this Entity in radians. |
Definition at line 134 of file Entity.java.
Referenced by bubolo.world.entity.Entity.setParams().
|
inherited |
Set this Entity's width.
size | is the desired Entity width in world coordinates. |
Definition at line 174 of file Entity.java.
Referenced by bubolo.world.entity.Entity.setParams().
|
inherited |
Sets this Entity's x position.
x | is the desired x position in world coordinates. |
Definition at line 148 of file Entity.java.
Referenced by bubolo.world.entity.Entity.setParams().
|
inherited |
Set this Entity's y position.
y | is the desired y position in world coordinates. |
Definition at line 161 of file Entity.java.
Referenced by bubolo.world.entity.Entity.setParams().
|
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.