Bandidos
Public Member Functions | List of all members
com.mygdx.game.traps.ITrap Interface Reference
Inheritance diagram for com.mygdx.game.traps.ITrap:
com.mygdx.game.traps.types.BaseTrap com.mygdx.game.traps.types.BaseBlockTrap com.mygdx.game.traps.types.ExplosiveBarrelDamageTrap com.mygdx.game.traps.types.TrainBlockTrap

Public Member Functions

void trigger ()
 
int getSizeX ()
 
int getSizeY ()
 
boolean canBeActive ()
 
void refresh ()
 

Detailed Description

This interface contains all the methods needed for a class to be a trap on a grid

Author
Ramses Di Perna

Member Function Documentation

◆ canBeActive()

boolean com.mygdx.game.traps.ITrap.canBeActive ( )

Indicates whether this trap is allowed to be active. This can be false due to it still running or other reasons the trap gives it

Returns
Whether the trap can be activated. True if it can, else false

Implemented in com.mygdx.game.traps.types.TrainBlockTrap, and com.mygdx.game.traps.types.ExplosiveBarrelDamageTrap.

◆ getSizeX()

int com.mygdx.game.traps.ITrap.getSizeX ( )

The amount of tiles this trap covers in the x axis starting from the left side

Returns
X size in tile amount

Implemented in com.mygdx.game.traps.types.TrainBlockTrap, and com.mygdx.game.traps.types.ExplosiveBarrelDamageTrap.

◆ getSizeY()

int com.mygdx.game.traps.ITrap.getSizeY ( )

The amount of tiles this trap covers in the y axis starting from the upper side

Returns
Y size in tile amount

Implemented in com.mygdx.game.traps.types.TrainBlockTrap, and com.mygdx.game.traps.types.ExplosiveBarrelDamageTrap.

◆ refresh()

void com.mygdx.game.traps.ITrap.refresh ( )

Is called when the trap is requested to be available again.

Implemented in com.mygdx.game.traps.types.TrainBlockTrap, and com.mygdx.game.traps.types.ExplosiveBarrelDamageTrap.

◆ trigger()

void com.mygdx.game.traps.ITrap.trigger ( )

Here the effect will be triggered of the trap

Implemented in com.mygdx.game.traps.types.BaseTrap.


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