Bandidos
Classes | Static Public Member Functions | List of all members
com.mygdx.game.factories.EffectFactory Class Reference

Classes

enum  ExplosionType
 

Static Public Member Functions

static Effect createHitEffect (float xPosition, float yPosition, float scale, Color color)
 
static BasicEntity createBloodPool (float xPosition, float yPosition, final float size, final float timeOnGround)
 
static Effect createExplosionEffect (ExplosionType explosionType, float xPosition, float yPosition, final float scale)
 
static TextEntity createTextEffect (FontData font, String text, float size, final float startX, final float startY, float x, float y)
 
static TextEntity createTextEffect (FontData font, String text, float size, final float startX, final float startY, float x, float y, float offsetX, float offsetY, final float waitTillFade)
 

Detailed Description

This class contains static methods which can be used to create effects

Author
Ramses Di Perna

Member Function Documentation

◆ createBloodPool()

static BasicEntity com.mygdx.game.factories.EffectFactory.createBloodPool ( float  xPosition,
float  yPosition,
final float  size,
final float  timeOnGround 
)
static

Creates a blood pool and makes it fade away after a given amount of time

Parameters
xPositionto spawn the blood pool
yPositionto spawn the blood pool
sizeto scale blood pool to
timeOnGroundis the time this blood pool is on the ground in seconds before it fades.
Returns
The blood pool instance created

◆ createExplosionEffect()

static Effect com.mygdx.game.factories.EffectFactory.createExplosionEffect ( ExplosionType  explosionType,
float  xPosition,
float  yPosition,
final float  scale 
)
static

Creates an explosion effect on the given position and deletes when it is finished playing

Parameters
explosionTypeis the type of explosion effect to spawn
xPositionis the x position to spawn the explosion effect on
yPositionis the y position to spawn the explosion effect on
scaleis how big the explosion effect should be scaled. This will also affect the screen shake of this effect
Returns
The explosion effect instance.

◆ createHitEffect()

static Effect com.mygdx.game.factories.EffectFactory.createHitEffect ( float  xPosition,
float  yPosition,
float  scale,
Color  color 
)
static

Creates a hit effect and deletes it when its finished.

Parameters
xPositionto spawn hit effect
yPositionto spawn hit effect
scaleto make hit effect
colorto dye the effect in
Returns
The hit effect instance created

◆ createTextEffect() [1/2]

static TextEntity com.mygdx.game.factories.EffectFactory.createTextEffect ( FontData  font,
String  text,
float  size,
final float  startX,
final float  startY,
float  x,
float  y 
)
static

Creates a text effect which pops out of a position and fades away afterwards.

Parameters
fontto give the text
textis the string to give the text
sizeas fontsize
startXwhere the effect will start
startYwhere the effect will start
xwhere the effect will lerp to
ywhere the effect will lerp to
Returns
The TextEntity instance which was created to do the effect with.

◆ createTextEffect() [2/2]

static TextEntity com.mygdx.game.factories.EffectFactory.createTextEffect ( FontData  font,
String  text,
float  size,
final float  startX,
final float  startY,
float  x,
float  y,
float  offsetX,
float  offsetY,
final float  waitTillFade 
)
static

Creates a text effect which pops out of a position and fades away afterwards.

Parameters
fontto give the text
textis the string to give the text
sizeas fontsize
startXwhere the effect will start
startYwhere the effect will start
xwhere the effect will lerp to
ywhere the effect will lerp to
offsetXis the forced offset despite the bounds onto the x param
offsetYis the forced offset despite the bounds onto the y param
Returns
The TextEntity instance which was created to do the effect with.

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