Bandidos
|
Public Member Functions | |
BaseTrap (Grid grid, TrapFactory.Direction direction) | |
int | place (int gridXPos, int gridYPos) |
TrapFactory.Direction | getDirection () |
void | trigger () |
Public Member Functions inherited from com.mygdx.game.engine.entities.BaseEntity | |
BaseEntity () | |
TransformComponent | getTransformComponent () |
boolean | hasInstanceOfComponent (BaseEntityComponent componentInstance) |
void | addTag (String tag) |
void | removeTag (String tag) |
boolean | hasTag (String tag) |
void | update (float dt) |
void | render (RenderComponents renderComponents) |
void | destroy () |
boolean | isDestroyed () |
Public Member Functions inherited from com.mygdx.game.engine.events.EventDispatcher | |
void | addEventListener (String type, IEventReceiver listeningClass) |
void | dispatchEvent (Event event) |
void | removeEventListener (String type, IEventReceiver listener) |
boolean | hasEventListener (String type) |
ArrayList< ListenerItem > | getAllListeners () |
void | destroyAllListeners () |
void | clean () |
Public Member Functions inherited from com.mygdx.game.traps.ITrap | |
int | getSizeX () |
int | getSizeY () |
boolean | canBeActive () |
void | refresh () |
Protected Member Functions | |
void | destroyed () |
Grid | getGrid () |
GridUserComponent | getGridUserComponent () |
abstract void | doEffect () |
Protected Member Functions inherited from com.mygdx.game.engine.entities.BaseEntity | |
abstract void | awake () |
abstract void | updated (float dt) |
abstract void | rendered (RenderComponents renderComponents) |
abstract void | destroyed () |
This is the base class for all the traps in the game.
com.mygdx.game.traps.types.BaseTrap.BaseTrap | ( | Grid | grid, |
TrapFactory.Direction | direction | ||
) |
|
protected |
|
abstractprotected |
This is triggered when the trap is triggered * it was allowed to be triggered by the 'canBeTriggered()' method
TrapFactory.Direction com.mygdx.game.traps.types.BaseTrap.getDirection | ( | ) |
Returns the direction which the trap is facing.
|
protected |
Returns the grid the trap is placed on
|
protected |
The Grid user component the traps use to effect the state of the tiles on the grid and to be placed on them
int com.mygdx.game.traps.types.BaseTrap.place | ( | int | gridXPos, |
int | gridYPos | ||
) |
Places the trap on the grid and sets the transform location on the tile its world location
gridXPos | is the x position as grid index (x axis) |
gridYPos | is the y position as grid index (y axis) |
void com.mygdx.game.traps.types.BaseTrap.trigger | ( | ) |
Here the effect will be triggered of the trap
Implements com.mygdx.game.traps.ITrap.