Bandidos
|
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< ListenerItem > | getAllListeners () |
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 () |
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
com.mygdx.game.components.enemyEffects.EnemyPoisonComponent.EnemyPoisonComponent | ( | boolean | removeComponentOnCure, |
int | killTool | ||
) |
The constructor of the poison component requires the following info
removeComponentOnCure | causes, 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 |
killTool | means when the enemy is killed by the poison, what KillTool it should represent to the HitRegistrationPoint |
|
protected |
void com.mygdx.game.components.enemyEffects.EnemyPoisonComponent.awake | ( | ) |
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
|
protected |
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.
event | which has one of the event types which is listened to. |
Implements com.mygdx.game.engine.events.IEventReceiver.
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)
duration | is the duration in game time seconds on how long the poison effect will affect the Enemy Entity this component is attached to |
totalDamage | is the total damage this poison effect will do when it has done its full effect over the given duration |
damageTikAmount | Is the amount of hurt ticks which will be done in the duration |
|
protected |