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

Public Member Functions

 EnemyPoisonComponent (boolean removeComponentOnCure, int killTool)
 
void onReceiveEvent (Event event)
 
void awake ()
 
void poison (float duration, float totalDamage, int damageTickAmount)
 
void cure ()
 
- 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 start a poison effect (including the green overlay) on the Enemy entity it is attached to when the 'poison' method is called. This effect will stop when the effect duration has ended or when the 'cure' method is called

Author
Ramses Di Perna

Constructor & Destructor Documentation

◆ EnemyPoisonComponent()

com.mygdx.game.components.enemyEffects.EnemyPoisonComponent.EnemyPoisonComponent ( boolean  removeComponentOnCure,
int  killTool 
)

The constructor of the poison component requires the following info

Parameters
removeComponentOnCurecauses, when is set to true, that the component will be destroyed after the poison effect has been done, else it will stay on the entity
killToolmeans when the enemy is killed by the poison, what KillTool it should represent to the HitRegistrationPoint

Member Function Documentation

◆ activeStateChanged()

void com.mygdx.game.components.enemyEffects.EnemyPoisonComponent.activeStateChanged ( )
protected

◆ awake()

void com.mygdx.game.components.enemyEffects.EnemyPoisonComponent.awake ( )

◆ cure()

void com.mygdx.game.components.enemyEffects.EnemyPoisonComponent.cure ( )

This cures the Enemy from the poison effect which was caused by this component. This method will do nothing if the poison effect caused by this component is not active

◆ destroyed()

void com.mygdx.game.components.enemyEffects.EnemyPoisonComponent.destroyed ( )
protected

◆ onReceiveEvent()

void com.mygdx.game.components.enemyEffects.EnemyPoisonComponent.onReceiveEvent ( Event  event)

This will be triggered when an event has been fired of type which this implementing class was listening to.

Parameters
eventwhich has one of the event types which is listened to.

Implements com.mygdx.game.engine.events.IEventReceiver.

◆ poison()

void com.mygdx.game.components.enemyEffects.EnemyPoisonComponent.poison ( float  duration,
float  totalDamage,
int  damageTickAmount 
)

Causes the poison to do its damaging effect over time until the duration has ended or when the 'cure' method is called The Damage for each tick is the (totalDamage / damageTikAmount) The tick will occurs each (duration / damageTikAmount)

Parameters
durationis the duration in game time seconds on how long the poison effect will affect the Enemy Entity this component is attached to
totalDamageis the total damage this poison effect will do when it has done its full effect over the given duration
damageTikAmountIs the amount of hurt ticks which will be done in the duration

◆ updated()

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

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