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 booleanprotected booleanprotected ColorPropertyprotected VariableAnimatedColorPropertystatic final FixedFloatPropertyprotected intprotected IntPropertyprotected FloatPropertyprotected FloatPropertyprotected VariableAnimatedFloatPropertyprotected Vector2fPropertyFields inherited from class dev.prozilla.pine.core.entity.prefab.sprite.SpritePrefab
cropToRegion, regionOffset, regionSize, texture -
Constructor Summary
ConstructorsConstructorDescriptionParticlePrefab(TextureAsset texture) ParticlePrefab(TextureAsset texture, FloatProperty lifetime) ParticlePrefab(String texturePath) ParticlePrefab(String texturePath, FloatProperty lifetime) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAdds this prefab's predefined components to a given entity and copies values from this prefab.voidsetAnimateSprite(boolean animateSprite) voidsetApplyTimeScale(boolean applyTimeScale) voidsetColor(ColorProperty color) voidvoidsetColorAlphaAnimation(Color base, EasingFunction easingFunction) Adds an animation for the alpha value of the particle's color, going from1fto0f.voidsetColorAlphaAnimation(Color base, FloatProperty alphaStart, FloatProperty alphaEnd) Adds a linear animation for the alpha value of the particle's color.voidsetColorAlphaAnimation(Color base, FloatProperty alphaStart, FloatProperty alphaEnd, EasingFunction easingFunction) Adds an animation for the alpha value of the particle's color.voidsetColorAnimation(ColorProperty start, ColorProperty end) Adds a linear animation for the color of the particle.voidsetColorAnimation(ColorProperty start, ColorProperty end, EasingFunction easingFunction) Adds an animation for the color of the particle.voidsetFrame(IntProperty frame) voidsetFrameCount(int frameCount) voidsetInitialFrame(IntProperty initialFrame) voidsetLifetime(FloatProperty lifetime) voidvoidsetScale(FloatProperty scale) voidsetScaleAnimation(FloatProperty start, FloatProperty end) Adds a linear animation for the scale of the particle.voidsetScaleAnimation(FloatProperty start, FloatProperty end, EasingFunction easingFunction) Adds an animation for the scale of the particle.voidsetVelocity(Vector2fProperty velocity) Methods inherited from class dev.prozilla.pine.core.entity.prefab.sprite.SpritePrefab
setRegionMethods inherited from class dev.prozilla.pine.core.entity.prefab.Prefab
addChild, addChildren, addChildren, instantiate, instantiate, removeChild, 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:
setColorin classSpritePrefab
-
setColor
-
setColorAlphaAnimation
Adds an animation for the alpha value of the particle's color, going from1fto0f. -
setColorAlphaAnimation
Adds a linear animation for the alpha value of the particle's color. -
setColorAlphaAnimation
public void setColorAlphaAnimation(Color base, FloatProperty alphaStart, FloatProperty 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(ColorProperty start, ColorProperty end, EasingFunction easingFunction) Adds an animation for the color of the particle. -
setScale
- Overrides:
setScalein classSpritePrefab
-
setScale
-
setScaleAnimation
Adds a linear animation for the scale of the particle. -
setScaleAnimation
public void setScaleAnimation(FloatProperty start, FloatProperty 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:PrefabAdds this prefab's predefined components to a given entity and copies values from this prefab.- Overrides:
applyin classSpritePrefab
-