Bandidos
|
Public Member Functions | |
TrapSpawnInfo (int gridPosX, int gridPosY, TrapFactory.Direction trapFaceDirection, float activatorPosition, TrapFactory.TrapType[] trapTypes) | |
TrapFactory.TrapType [] | getTrapsAbleToSpawn () |
TrapFactory.Direction | getTrapFaceDirection () |
int | getGridPosX () |
int | getGridPosY () |
float | getActivatorPosition () |
This class contains all the info for a specific trap spawn location on
com.mygdx.game.traps.TrapSpawnInfo.TrapSpawnInfo | ( | int | gridPosX, |
int | gridPosY, | ||
TrapFactory.Direction | trapFaceDirection, | ||
float | activatorPosition, | ||
TrapFactory.TrapType [] | trapTypes | ||
) |
The trap info needs the following info details in order to function.
gridPosX | represents the X index location it will spawn the traps on the grid. |
gridPosY | represents the Y index location it will spawn the traps on the grid. |
trapFaceDirection | represents the direction the trap will be facing. At the end of this direction the an activator is adviced to be placed. |
activatorPosition | is the normalized activator position in relation to the trap size. |
trapTypes | contains the different Trap Types which are able to be spawned on this spawn location. |
float com.mygdx.game.traps.TrapSpawnInfo.getActivatorPosition | ( | ) |
Returns the activator normalized position (0 - 1)
int com.mygdx.game.traps.TrapSpawnInfo.getGridPosX | ( | ) |
The X index location the trap will be spawned on
int com.mygdx.game.traps.TrapSpawnInfo.getGridPosY | ( | ) |
The Y index location the trap will be spawned on
TrapFactory.Direction com.mygdx.game.traps.TrapSpawnInfo.getTrapFaceDirection | ( | ) |
Returns the direction the trap is requested to face when spawned
TrapFactory.TrapType [] com.mygdx.game.traps.TrapSpawnInfo.getTrapsAbleToSpawn | ( | ) |
Returns a list of TrapTypes which are able to be spawned on this spawn location