Class ParticlePrefab
java.lang.Object
dev.prozilla.pine.core.entity.prefab.Prefab
dev.prozilla.pine.core.entity.prefab.sprite.SpritePrefab
dev.prozilla.pine.core.entity.prefab.particle.ParticlePrefab
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
protected boolean
protected VariableProperty
<Color> protected VariableAnimatedColorProperty
static final VariableProperty
<Float> protected int
protected VariableProperty
<Integer> protected VariableProperty
<Float> protected VariableProperty
<Float> protected VariableAnimatedFloatProperty
protected VariableProperty
<Vector2f> Fields inherited from class dev.prozilla.pine.core.entity.prefab.sprite.SpritePrefab
cropToRegion, regionOffset, regionSize, texture
-
Constructor Summary
ConstructorsConstructorDescriptionParticlePrefab
(TextureBase texture) ParticlePrefab
(TextureBase texture, VariableProperty<Float> lifetime) ParticlePrefab
(String texturePath) ParticlePrefab
(String texturePath, VariableProperty<Float> lifetime) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Adds this prefab's predefined components to a given entity and copies values from this prefab.void
setAnimateSprite
(boolean animateSprite) void
setApplyTimeScale
(boolean applyTimeScale) void
setColor
(VariableProperty<Color> color) void
void
setColorAlphaAnimation
(Color base, EasingFunction easingFunction) Adds an animation for the alpha value of the particle's color, going from1f
to0f
.void
setColorAlphaAnimation
(Color base, VariableProperty<Float> alphaStart, VariableProperty<Float> alphaEnd) Adds a linear animation for the alpha value of the particle's color.void
setColorAlphaAnimation
(Color base, VariableProperty<Float> alphaStart, VariableProperty<Float> alphaEnd, EasingFunction easingFunction) Adds an animation for the alpha value of the particle's color.void
setColorAnimation
(VariableProperty<Color> start, VariableProperty<Color> end) Adds a linear animation for the color of the particle.void
setColorAnimation
(VariableProperty<Color> start, VariableProperty<Color> end, EasingFunction easingFunction) Adds an animation for the color of the particle.void
setFrame
(VariableProperty<Integer> frame) void
setFrameCount
(int frameCount) void
setInitialFrame
(VariableProperty<Integer> initialFrame) void
setLifetime
(VariableProperty<Float> lifetime) void
setScale
(float scale) void
setScale
(VariableProperty<Float> scale) void
setScaleAnimation
(VariableProperty<Float> start, VariableProperty<Float> end) Adds a linear animation for the scale of the particle.void
setScaleAnimation
(VariableProperty<Float> start, VariableProperty<Float> end, EasingFunction easingFunction) Adds an animation for the scale of the particle.void
setVelocity
(VariableProperty<Vector2f> velocity) Methods inherited from class dev.prozilla.pine.core.entity.prefab.sprite.SpritePrefab
setRegion
Methods inherited from class dev.prozilla.pine.core.entity.prefab.Prefab
instantiate, instantiate, setActive, setName, setTag
-
Field Details
-
color
-
lifetime
-
velocity
-
scale
-
applyTimeScale
protected boolean applyTimeScale -
scaleAnimation
-
colorAnimation
-
frameCount
protected int frameCount -
animateSprite
protected boolean animateSprite -
initialFrame
-
DEFAULT_LIFETIME
-
-
Constructor Details
-
ParticlePrefab
-
ParticlePrefab
-
ParticlePrefab
-
ParticlePrefab
-
-
Method Details
-
setColor
- Overrides:
setColor
in classSpritePrefab
-
setColor
-
setColorAlphaAnimation
Adds an animation for the alpha value of the particle's color, going from1f
to0f
. -
setColorAlphaAnimation
public void setColorAlphaAnimation(Color base, VariableProperty<Float> alphaStart, VariableProperty<Float> alphaEnd) Adds a linear animation for the alpha value of the particle's color. -
setColorAlphaAnimation
public void setColorAlphaAnimation(Color base, VariableProperty<Float> alphaStart, VariableProperty<Float> alphaEnd, EasingFunction easingFunction) Adds an animation for the alpha value of the particle's color. -
setColorAnimation
Adds a linear animation for the color of the particle. -
setColorAnimation
public void setColorAnimation(VariableProperty<Color> start, VariableProperty<Color> end, EasingFunction easingFunction) Adds an animation for the color of the particle. -
setScale
public void setScale(float scale) - Overrides:
setScale
in classSpritePrefab
-
setScale
-
setScaleAnimation
Adds a linear animation for the scale of the particle. -
setScaleAnimation
public void setScaleAnimation(VariableProperty<Float> start, VariableProperty<Float> end, EasingFunction easingFunction) Adds an animation for the scale of the particle. -
setLifetime
-
setVelocity
-
setFrameCount
public void setFrameCount(int frameCount) -
setFrame
-
setAnimateSprite
public void setAnimateSprite(boolean animateSprite) -
setInitialFrame
-
setApplyTimeScale
public void setApplyTimeScale(boolean applyTimeScale) -
apply
Description copied from class:Prefab
Adds this prefab's predefined components to a given entity and copies values from this prefab.- Overrides:
apply
in classSpritePrefab
-