public class Chancellor
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) Tile |
currentTile |
(package private) float |
currentTimeOnTile |
(package private) GameEngine |
gameEngine |
static float |
INTERVAL |
(package private) float |
time |
Constructor and Description |
---|
Chancellor(GameEngine engine)
The method that creates the object chancellor
|
Modifier and Type | Method and Description |
---|---|
private void |
changeTile()
Method to choose a random tile from the 16 available
|
Tile |
getCurrentTile()
Getter for the current tile
Used for testing class
|
float |
getCurrentTimeOnTile()
Getter for the current time on tile
Used for testing class
|
float |
getTime()
Getter for time
Used for testing the class
|
private void |
removeFromTile()
Removes the chancellor from a tile
|
void |
reset()
Method to reset the game and make the chancellor hidden on all tiles
|
void |
update(float dTime)
Updates the tile image using delta time
|
GameEngine gameEngine
public static final float INTERVAL
float time
float currentTimeOnTile
Tile currentTile
public Chancellor(GameEngine engine)
engine
- uses the game engineprivate void changeTile()
private void removeFromTile()
public void update(float dTime)
dTime
- - calls the delta time used throughout the game enginepublic void reset()
public float getTime()
public float getCurrentTimeOnTile()
public Tile getCurrentTile()