Bandidos
Public Member Functions | Protected Member Functions | List of all members
com.mygdx.game.components.ExplosiveComponent Class Reference
Inheritance diagram for com.mygdx.game.components.ExplosiveComponent:
com.mygdx.game.engine.entities.components.BaseEntityComponent com.mygdx.game.engine.events.EventDispatcher

Public Member Functions

 ExplosiveComponent (String[] tagsToEffect, boolean endHitStreakOnMiss)
 
 ExplosiveComponent (String tagToEffect, boolean endHitStreakOnMiss)
 
void setEndHitStreakOnMiss (boolean value)
 
Effect triggerExplosion (EffectFactory.ExplosionType explosionType, float dmg, float radius, float scale, int hitTool)
 
void awake ()
 
- Public Member Functions inherited from com.mygdx.game.engine.entities.components.BaseEntityComponent
EngineTween startTweenOnComponent (Tween tween, TweenStartType tweenStartType)
 
Timeline startTimelineOnComponent (Timeline timeline, boolean updateInGameTime)
 
EngineTween doFloat (TweenableFloat floatToTween, float newValue, float duration, TweenStartType tweenStartType)
 
void stopAllComponentTweens ()
 
void initialize (BaseEntity parentEntity)
 
BaseEntity getParentOfComponent ()
 
boolean isActive ()
 
boolean isDestroyed ()
 
void setActiveState (boolean activeState)
 
void destroy ()
 
void update (float deltaTime)
 
abstract void awake ()
 
- 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 updated (float deltaTime)
 
void destroyed ()
 
void activeStateChanged ()
 
- Protected Member Functions inherited from com.mygdx.game.engine.entities.components.BaseEntityComponent
abstract void updated (float deltaTime)
 
abstract void destroyed ()
 
abstract void activeStateChanged ()
 

Detailed Description

This component, when triggered, makes an explosion effect of the given type and damages all entities in radius with the 'HealthComponent' attached and if they are any of the given tags to effect

Author
Ramses Di Perna

Constructor & Destructor Documentation

◆ ExplosiveComponent() [1/2]

com.mygdx.game.components.ExplosiveComponent.ExplosiveComponent ( String []  tagsToEffect,
boolean  endHitStreakOnMiss 
)

◆ ExplosiveComponent() [2/2]

com.mygdx.game.components.ExplosiveComponent.ExplosiveComponent ( String  tagToEffect,
boolean  endHitStreakOnMiss 
)

Member Function Documentation

◆ activeStateChanged()

void com.mygdx.game.components.ExplosiveComponent.activeStateChanged ( )
protected

◆ awake()

void com.mygdx.game.components.ExplosiveComponent.awake ( )

◆ destroyed()

void com.mygdx.game.components.ExplosiveComponent.destroyed ( )
protected

◆ setEndHitStreakOnMiss()

void com.mygdx.game.components.ExplosiveComponent.setEndHitStreakOnMiss ( boolean  value)

◆ triggerExplosion()

Effect com.mygdx.game.components.ExplosiveComponent.triggerExplosion ( EffectFactory.ExplosionType  explosionType,
float  dmg,
float  radius,
float  scale,
int  hitTool 
)

This method triggers an explosion by this component on the location of the entity its attached to.

Parameters
explosionTypeis the type of explosion effect to spawn
dmgis the damage which should be caused to the hit entities holding an HealthComponent
radiusis the radius in which the entities should stand from this entity in distance in order to be affected by the explosion.
scaleis the scale of the explosion, this affects the explosion effect, damage and radius.
Returns
The explosion effect created.

◆ updated()

void com.mygdx.game.components.ExplosiveComponent.updated ( float  deltaTime)
protected

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