Bandidos
Public Member Functions | List of all members
com.mygdx.game.traps.TrapSpawnInfo Class Reference

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 ()
 

Detailed Description

This class contains all the info for a specific trap spawn location on

Constructor & Destructor Documentation

◆ TrapSpawnInfo()

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.

Parameters
gridPosXrepresents the X index location it will spawn the traps on the grid.
gridPosYrepresents the Y index location it will spawn the traps on the grid.
trapFaceDirectionrepresents the direction the trap will be facing. At the end of this direction the an activator is adviced to be placed.
activatorPositionis the normalized activator position in relation to the trap size.
trapTypescontains the different Trap Types which are able to be spawned on this spawn location.

Member Function Documentation

◆ getActivatorPosition()

float com.mygdx.game.traps.TrapSpawnInfo.getActivatorPosition ( )

Returns the activator normalized position (0 - 1)

Returns
The normalized activator position in relation to the trap size

◆ getGridPosX()

int com.mygdx.game.traps.TrapSpawnInfo.getGridPosX ( )

The X index location the trap will be spawned on

Returns
index representing an X axis position of the grid

◆ getGridPosY()

int com.mygdx.game.traps.TrapSpawnInfo.getGridPosY ( )

The Y index location the trap will be spawned on

Returns
index representing an Y axis position of the grid

◆ getTrapFaceDirection()

TrapFactory.Direction com.mygdx.game.traps.TrapSpawnInfo.getTrapFaceDirection ( )

Returns the direction the trap is requested to face when spawned

Returns
Direction for trap

◆ getTrapsAbleToSpawn()

TrapFactory.TrapType [] com.mygdx.game.traps.TrapSpawnInfo.getTrapsAbleToSpawn ( )

Returns a list of TrapTypes which are able to be spawned on this spawn location

Returns
A list of TrapType Enum items

The documentation for this class was generated from the following file: