Bandidos
Public Member Functions | Protected Member Functions | List of all members
com.mygdx.game.traps.types.ExplosiveBarrel Class Reference
Inheritance diagram for com.mygdx.game.traps.types.ExplosiveBarrel:
com.mygdx.game.engine.entities.BaseEntity com.mygdx.game.engine.events.EventDispatcher

Public Member Functions

 ExplosiveBarrel (float dmg, float radius)
 
void triggerBarrel ()
 
boolean hasExploded ()
 
- 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< ListenerItemgetAllListeners ()
 
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 ()
 

Detailed Description

This entity is an explosive barrel which can be triggered once to explode and will remove itself when it has been triggered after x amount of time The barrel will only damage enemies.

Author
Ramses Di Perna

Constructor & Destructor Documentation

◆ ExplosiveBarrel()

com.mygdx.game.traps.types.ExplosiveBarrel.ExplosiveBarrel ( float  dmg,
float  radius 
)

Creates an Explosive barrel with its stats in tact from the start

Parameters
dmgrepresents the damage this barrel will do to all enemies in his explosion radius
radiusto check for enemies to damage with the given damage amount

Member Function Documentation

◆ awake()

void com.mygdx.game.traps.types.ExplosiveBarrel.awake ( )
protected

◆ destroyed()

void com.mygdx.game.traps.types.ExplosiveBarrel.destroyed ( )
protected

◆ hasExploded()

boolean com.mygdx.game.traps.types.ExplosiveBarrel.hasExploded ( )

Returns whether this barrel has exploded.

Returns
True if it has else false

◆ rendered()

void com.mygdx.game.traps.types.ExplosiveBarrel.rendered ( RenderComponents  renderComponents)
protected

◆ triggerBarrel()

void com.mygdx.game.traps.types.ExplosiveBarrel.triggerBarrel ( )

Triggers the barrel to explode. Note: This can only be triggered once for each instance.

◆ updated()

void com.mygdx.game.traps.types.ExplosiveBarrel.updated ( float  dt)
protected

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