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

Public Member Functions

 Effect (RenderInfo effectAnimation, boolean ui, float fadeOutDuration)
 
 Effect (RenderInfo effectAnimation, boolean ui)
 
AnimationComponent getAnimationComponent ()
 
void onReceiveEvent (Event event)
 
- 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 is an Entity class which plays the given RenderInfo as animation and destroys itself after the animation has ended.

Author
Ramses Di Perna

Constructor & Destructor Documentation

◆ Effect() [1/2]

com.mygdx.game.entities.Effect.Effect ( RenderInfo  effectAnimation,
boolean  ui,
float  fadeOutDuration 
)

Creates an Effect to render on screen and destroy after the fade has ended which will be triggered after the animation end

Parameters
effectAnimationwhich to play one time as the effect
ui,iftrue, this effect will be played in the UI, else in the game world
fadeOutDurationif left at 0, this effect will be destroyed after its end, else it will also fade out and destroy after the fade effect.

◆ Effect() [2/2]

com.mygdx.game.entities.Effect.Effect ( RenderInfo  effectAnimation,
boolean  ui 
)

Creates an Effect to render on screen and destroy after the animation has ended.

Parameters
effectAnimationwhich to play one time as the effect
ui,iftrue, this effect will be played in the UI, else in the game world

Member Function Documentation

◆ awake()

void com.mygdx.game.entities.Effect.awake ( )
protected

◆ destroyed()

void com.mygdx.game.entities.Effect.destroyed ( )
protected

◆ getAnimationComponent()

AnimationComponent com.mygdx.game.entities.Effect.getAnimationComponent ( )

Returns the AnimationComponent attached to this entity

Returns
AnimationComponent attached to this entity

◆ onReceiveEvent()

void com.mygdx.game.entities.Effect.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.

◆ rendered()

void com.mygdx.game.entities.Effect.rendered ( RenderComponents  renderComponents)
protected

◆ updated()

void com.mygdx.game.entities.Effect.updated ( float  dt)
protected

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