Bandidos
|
Public Member Functions | |
TrapSpawn (TrapSpawnInfo info, Grid grid) | |
void | spawnTrap (float activatorPosition) |
void | countForResetTrap () |
void | forceResetTrap () |
TrapActivator | getTrapActivator () |
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 () |
Protected Member Functions | |
void | awake () |
void | updated (float dt) |
void | rendered (RenderComponents renderComponents) |
void | destroyed () |
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 class is responsible for spawning the correct trap in the correct manner when its 'spawnTrap' method is called. This will handle the trap's orientation, location and spawning + linking the trap activator correctly
com.mygdx.game.traps.TrapSpawn.TrapSpawn | ( | TrapSpawnInfo | info, |
Grid | grid | ||
) |
The TrapSpawn needs get information on what traps its able to spawn and on what grid. It positions itself using the info given.
info | containing the information of the traps it can spawn. |
grid | to spawn the traps on and to give to the traps. |
|
protected |
void com.mygdx.game.traps.TrapSpawn.countForResetTrap | ( | ) |
Counts a tick which is set for this TrapSpawn to wait until it can reset the trap. (Tick amount gotten from the TrapFactory)
|
protected |
void com.mygdx.game.traps.TrapSpawn.forceResetTrap | ( | ) |
Resets the Trap spawned by this TrapSpawn
TrapActivator com.mygdx.game.traps.TrapSpawn.getTrapActivator | ( | ) |
Returns the TrapActivator spawned by this TrapSpawn and which is linked to the Trap of this TrapSpawn
|
protected |
void com.mygdx.game.traps.TrapSpawn.spawnTrap | ( | float | activatorPosition | ) |
Spawns a trap and trap activator and positions them and links them.
|
protected |