Public Member Functions | |
| Entity () | |
| Entity (UUID newID) | |
| 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) |
Base class for game objects. Anything that is part of the game logic should inherit from this class.
Definition at line 14 of file Entity.java.
| bubolo.world.entity.Entity.Entity | ( | ) |
Construct a new Entity with a random UUID.
Definition at line 28 of file Entity.java.
| bubolo.world.entity.Entity.Entity | ( | UUID | newID | ) |
Construct a new Entity with the specified UUID.
| newID | is the existing UUID to be assigned to the new Entity. |
Definition at line 39 of file Entity.java.
| int bubolo.world.entity.Entity.getHeight | ( | ) |
Get the height of this Entity.
Implements bubolo.graphics.Drawable.
Definition at line 88 of file Entity.java.
| UUID bubolo.world.entity.Entity.getId | ( | ) |
| float bubolo.world.entity.Entity.getRotation | ( | ) |
Get the current rotation of this Entity.
Implements bubolo.graphics.Drawable.
Definition at line 110 of file Entity.java.
| int bubolo.world.entity.Entity.getWidth | ( | ) |
Get the width of this Entity.
Implements bubolo.graphics.Drawable.
Definition at line 94 of file Entity.java.
| float bubolo.world.entity.Entity.getX | ( | ) |
Get the x position of this Entity.
Implements bubolo.graphics.Drawable.
Definition at line 116 of file Entity.java.
| float bubolo.world.entity.Entity.getY | ( | ) |
Get the y position of this Entity.
Implements bubolo.graphics.Drawable.
Definition at line 122 of file Entity.java.
| Entity bubolo.world.entity.Entity.setHeight | ( | int | size | ) |
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().
| void bubolo.world.entity.Entity.setId | ( | UUID | id | ) |
Sets the Entity's unique id.
| id | the 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 | ||
| ) |
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().
| Entity bubolo.world.entity.Entity.setRotation | ( | float | newRotation | ) |
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().
| Entity bubolo.world.entity.Entity.setWidth | ( | int | size | ) |
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().
| Entity bubolo.world.entity.Entity.setX | ( | float | x | ) |
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().
| Entity bubolo.world.entity.Entity.setY | ( | float | y | ) |
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().
| void bubolo.world.entity.Entity.update | ( | ) |
Updates the state of this Entity. Called multiple times per second to maintain current Entity state.
Definition at line 104 of file Entity.java.
1.8.6