Class EmitterAttributes
- All Implemented Interfaces:
Resource, Serializable, Comparable<Resource>
Represents the data structure for a particle emitter.
This class is used to serialize and configure emitter properties such as color, particle movement, rendering options, and particle life cycle. It supports XML binding for persistent configurations.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final floatDefault alpha variance (0..1) applied per particle.static final booleanDefault value controlling whether sprite-based particles are animated.static final booleanDefault value controlling whether particles are rendered with anti-aliasing.static final CollisionDefault collision behavior applied to emitted particles.static final ColorDefault base color used for emitted particles when no colors are configured.static final floatDefault color variance (0..1) applied per particle.static final intDefault emitter duration in milliseconds;0means the emitter runs indefinitely.static final booleanDefault value controlling whether particles fade out over their lifetime.static final booleanDefault value controlling whether particles fade upon collision.static final floatDefault emitter height in pixels.static final booleanDefault value controlling whether sprite-based particle animations are looped.static final floatDefault maximum horizontal acceleration applied to a particle.static final floatDefault maximum vertical acceleration applied to a particle.static final floatDefault maximum angle delta applied per update to a particle.static final floatDefault maximum height delta applied per update to a particle.static final floatDefault maximum width delta applied per update to a particle.static final floatDefault maximum height of a spawned particle.static final floatDefault maximum horizontal spawn offset relative to the emitter origin.static final floatDefault maximum vertical spawn offset relative to the emitter origin.static final floatDefault maximum outline thickness for outline-rendered particles.static final intDefault maximum time-to-live for a particle in milliseconds.static final floatDefault maximum starting angle in degrees of a spawned particle.static final floatDefault maximum horizontal velocity of a spawned particle.static final floatDefault maximum vertical velocity of a spawned particle.static final floatDefault maximum width of a spawned particle.static final intDefault maximum number of concurrently alive particles.static final floatDefault minimum horizontal acceleration applied to a particle.static final floatDefault minimum vertical acceleration applied to a particle.static final floatDefault minimum starting angle in degrees of a spawned particle.static final floatDefault minimum angle delta applied per update to a particle.static final floatDefault minimum height delta applied per update to a particle.static final floatDefault minimum width delta applied per update to a particle.static final floatDefault minimum height of a spawned particle.static final floatDefault minimum horizontal spawn offset relative to the emitter origin.static final floatDefault minimum vertical spawn offset relative to the emitter origin.static final floatDefault minimum outline thickness for outline-rendered particles.static final intDefault minimum time-to-live for a particle in milliseconds.static final floatDefault minimum horizontal velocity of a spawned particle.static final floatDefault minimum vertical velocity of a spawned particle.static final floatDefault minimum width of a spawned particle.static final StringDefault display name assigned to a newly created emitter.static final AlignDefault horizontal alignment of the emitter origin.static final ValignDefault vertical alignment of the emitter origin.static final booleanDefault value controlling whether shape-based particles are rendered as outlines only.static final ParticleTypeDefault particle shape/type used when none is specified.static final QualityDefault minimum graphics quality required for the emitter to be rendered.static final intDefault number of particles spawned per spawn tick.static final intDefault spawn rate in milliseconds between spawn ticks.static final StringDefault spritesheet name; empty means no spritesheet is associated.static final StringDefault text content used by text-rendering particles.static final intDefault update rate of the emitter in milliseconds.static final floatDefault emitter width in pixels. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a newEmitterAttributesinstance and initializes allRangeAttributefields and other defaults required for the emitter to be rendered and updated correctly. -
Method Summary
Modifier and TypeMethodDescriptionGets the horizontal acceleration parameter of spawned particles.Gets the vertical acceleration parameter of spawned particles.floatGets the per-particle alpha variance.getAngle()Gets the starting angle parameter for spawned particles.Gets the collision behavior of emitted particles.Gets the configured list of color strings used when spawning particles.floatGets the per-particle color variance.Gets the decodedColorlist derived from the configured color strings.Gets the per-particle angle delta parameter.Gets the per-particle height delta parameter.Gets the per-particle width delta parameter.intGets the emitter duration in milliseconds.floatGets the height of the emitter in pixels.intGets the maximum number of concurrently alive particles allowed for this emitter.getName()Gets the name of the resource.Gets the horizontal alignment of the emitter origin.Gets the vertical alignment of the emitter origin.Gets the outline thickness parameter applied to outline-rendered particles.Gets the per-particle height parameter.Gets the horizontal spawn offset parameter relative to the emitter origin.Gets the vertical spawn offset parameter relative to the emitter origin.Gets the particle time-to-live (TTL) parameter, in milliseconds.Gets the particle type (shape) used when spawning particles.Gets the per-particle width parameter.Gets the minimum graphicsQualityrequired for this emitter to be rendered.intGets the number of particles that are spawned per spawn tick.intGets the spawn rate in milliseconds between spawn ticks.Gets the name of the spritesheet used by sprite-based particles.getTexts()Gets the list of text strings used by text-rendering particles.intGets the update rate of the emitter in milliseconds.Gets the horizontal velocity parameter of spawned particles.Gets the vertical velocity parameter of spawned particles.floatgetWidth()Gets the width of the emitter in pixels.voidInitializes all configurable emitter and particle parameters to theirDEFAULT_*values.booleanReturns whether sprite-based particles are animated.booleanReturns whether particles are rendered with anti-aliasing.booleanisFading()Returns whether particles fade out over their lifetime.booleanReturns whether particles fade upon collision.booleanReturns whether sprite-based particle animations are looped.booleanReturns whether shape-based particles are rendered as outlines only.voidsetAccelerationX(RangeAttribute<Float> accelerationX) Sets the horizontal acceleration parameter of spawned particles.voidsetAccelerationY(RangeAttribute<Float> accelerationY) Sets the vertical acceleration parameter of spawned particles.voidsetAlphaVariance(float alphaVariance) Sets the per-particle alpha variance.voidsetAngle(RangeAttribute<Float> angle) Sets the starting angle parameter for spawned particles.voidsetAnimateSprite(boolean animateSprite) Sets whether sprite-based particles are animated.voidsetAntiAliasing(boolean antiAliasing) Sets whether particles are rendered with anti-aliasing.voidsetCollision(Collision collision) Sets the collision behavior of emitted particles.voidSets a single color used for spawning particles, replacing any previously configured colors.voidSets the colors used when spawning particles by encoding the given AWT colors.voidSets the list of color strings used when spawning particles and invalidates the decoded color cache.voidsetColorVariance(float colorVariance) Sets the per-particle color variance.voidsetDeltaHeight(RangeAttribute<Float> deltaHeight) Sets the per-particle height delta parameter.voidsetDeltaRotation(RangeAttribute<Float> deltaRotation) Sets the per-particle angle delta parameter.voidsetDeltaWidth(RangeAttribute<Float> deltaWidth) Sets the per-particle width delta parameter.voidsetEmitterDuration(int emitterDuration) Sets the emitter duration in milliseconds.voidsetFade(boolean fade) Sets whether particles fade out over their lifetime.voidsetFadeOnCollision(boolean fadeOnCollision) Sets whether particles fade upon collision.voidsetHeight(float height) Sets the height of the emitter in pixels.voidsetLoopSprite(boolean loopSprite) Sets whether sprite-based particle animations are looped.voidsetMaxParticles(int maxParticles) Sets the maximum number of concurrently alive particles allowed for this emitter.voidSets the name of the resource.voidsetOriginAlign(Align align) Sets the horizontal alignment of the emitter origin.voidsetOriginValign(Valign valign) Sets the vertical alignment of the emitter origin.voidsetOutlineOnly(boolean outlineOnly) Sets whether shape-based particles are rendered as outlines only.voidsetOutlineThickness(RangeAttribute<Float> outlineThickness) Sets the outline thickness parameter applied to outline-rendered particles.voidsetParticleHeight(RangeAttribute<Float> particleHeight) Sets the per-particle height parameter.voidSets the horizontal spawn offset parameter relative to the emitter origin.voidSets the vertical spawn offset parameter relative to the emitter origin.voidsetParticleTTL(RangeAttribute<Long> particleTTL) Sets the particle time-to-live (TTL) parameter, in milliseconds.voidsetParticleType(ParticleType particleType) Sets the particle type (shape) used when spawning particles.voidsetParticleWidth(RangeAttribute<Float> particleWidth) Sets the per-particle width parameter.voidsetRequiredQuality(Quality minQuality) Sets the minimum graphicsQualityrequired for this emitter to be rendered.voidsetSpawnAmount(int spawnAmount) Sets the number of particles that are spawned per spawn tick.voidsetSpawnRate(int spawnRate) Sets the spawn rate in milliseconds between spawn ticks.voidsetSpritesheet(Spritesheet spritesheet) Sets the spritesheet used by sprite-based particles using aSpritesheetreference.voidsetSpritesheet(String spritesheetName) Sets the name of the spritesheet used by sprite-based particles.voidSets a single text used by text-rendering particles, replacing any previously configured texts.voidSets the list of text strings used by text-rendering particles.voidsetUpdateRate(int updateRate) Sets the update rate of the emitter in milliseconds.voidsetVelocityX(RangeAttribute<Float> velocityX) Sets the horizontal velocity parameter of spawned particles.voidsetVelocityY(RangeAttribute<Float> velocityY) Sets the vertical velocity parameter of spawned particles.voidsetWidth(float width) Sets the width of the emitter in pixels.
-
Field Details
-
DEFAULT_COLOR
Default base color used for emitted particles when no colors are configured. -
DEFAULT_SPRITESHEET
Default spritesheet name; empty means no spritesheet is associated.- See Also:
-
DEFAULT_NAME
Default display name assigned to a newly created emitter.- See Also:
-
DEFAULT_TEXT
Default text content used by text-rendering particles.- See Also:
-
DEFAULT_ANIMATE_SPRITE
public static final boolean DEFAULT_ANIMATE_SPRITEDefault value controlling whether sprite-based particles are animated.- See Also:
-
DEFAULT_LOOP_SPRITE
public static final boolean DEFAULT_LOOP_SPRITEDefault value controlling whether sprite-based particle animations are looped.- See Also:
-
DEFAULT_FADE
public static final boolean DEFAULT_FADEDefault value controlling whether particles fade out over their lifetime.- See Also:
-
DEFAULT_FADE_ON_COLLISION
public static final boolean DEFAULT_FADE_ON_COLLISIONDefault value controlling whether particles fade upon collision.- See Also:
-
DEFAULT_OUTLINE_ONLY
public static final boolean DEFAULT_OUTLINE_ONLYDefault value controlling whether shape-based particles are rendered as outlines only.- See Also:
-
DEFAULT_ANTIALIASING
public static final boolean DEFAULT_ANTIALIASINGDefault value controlling whether particles are rendered with anti-aliasing.- See Also:
-
DEFAULT_COLLISION
Default collision behavior applied to emitted particles. -
DEFAULT_PARTICLE_TYPE
Default particle shape/type used when none is specified. -
DEFAULT_REQUIRED_QUALITY
Default minimum graphics quality required for the emitter to be rendered. -
DEFAULT_ORIGIN_ALIGN
Default horizontal alignment of the emitter origin. -
DEFAULT_ORIGIN_VALIGN
Default vertical alignment of the emitter origin. -
DEFAULT_WIDTH
public static final float DEFAULT_WIDTHDefault emitter width in pixels.- See Also:
-
DEFAULT_HEIGHT
public static final float DEFAULT_HEIGHTDefault emitter height in pixels.- See Also:
-
DEFAULT_COLOR_VARIANCE
public static final float DEFAULT_COLOR_VARIANCEDefault color variance (0..1) applied per particle.- See Also:
-
DEFAULT_ALPHA_VARIANCE
public static final float DEFAULT_ALPHA_VARIANCEDefault alpha variance (0..1) applied per particle.- See Also:
-
DEFAULT_UPDATERATE
public static final int DEFAULT_UPDATERATEDefault update rate of the emitter in milliseconds.- See Also:
-
DEFAULT_SPAWNAMOUNT
public static final int DEFAULT_SPAWNAMOUNTDefault number of particles spawned per spawn tick.- See Also:
-
DEFAULT_SPAWNRATE
public static final int DEFAULT_SPAWNRATEDefault spawn rate in milliseconds between spawn ticks.- See Also:
-
DEFAULT_MAXPARTICLES
public static final int DEFAULT_MAXPARTICLESDefault maximum number of concurrently alive particles.- See Also:
-
DEFAULT_DURATION
public static final int DEFAULT_DURATIONDefault emitter duration in milliseconds;0means the emitter runs indefinitely.- See Also:
-
DEFAULT_MIN_PARTICLE_TTL
public static final int DEFAULT_MIN_PARTICLE_TTLDefault minimum time-to-live for a particle in milliseconds.- See Also:
-
DEFAULT_MAX_PARTICLE_TTL
public static final int DEFAULT_MAX_PARTICLE_TTLDefault maximum time-to-live for a particle in milliseconds.- See Also:
-
DEFAULT_MIN_OFFSET_X
public static final float DEFAULT_MIN_OFFSET_XDefault minimum horizontal spawn offset relative to the emitter origin.- See Also:
-
DEFAULT_MAX_OFFSET_X
public static final float DEFAULT_MAX_OFFSET_XDefault maximum horizontal spawn offset relative to the emitter origin.- See Also:
-
DEFAULT_MIN_OFFSET_Y
public static final float DEFAULT_MIN_OFFSET_YDefault minimum vertical spawn offset relative to the emitter origin.- See Also:
-
DEFAULT_MAX_OFFSET_Y
public static final float DEFAULT_MAX_OFFSET_YDefault maximum vertical spawn offset relative to the emitter origin.- See Also:
-
DEFAULT_MIN_DELTA_WIDTH
public static final float DEFAULT_MIN_DELTA_WIDTHDefault minimum width delta applied per update to a particle.- See Also:
-
DEFAULT_MAX_DELTA_WIDTH
public static final float DEFAULT_MAX_DELTA_WIDTHDefault maximum width delta applied per update to a particle.- See Also:
-
DEFAULT_MIN_DELTA_HEIGHT
public static final float DEFAULT_MIN_DELTA_HEIGHTDefault minimum height delta applied per update to a particle.- See Also:
-
DEFAULT_MAX_DELTA_HEIGHT
public static final float DEFAULT_MAX_DELTA_HEIGHTDefault maximum height delta applied per update to a particle.- See Also:
-
DEFAULT_MIN_ACCELERATION_X
public static final float DEFAULT_MIN_ACCELERATION_XDefault minimum horizontal acceleration applied to a particle.- See Also:
-
DEFAULT_MAX_ACCELERATION_X
public static final float DEFAULT_MAX_ACCELERATION_XDefault maximum horizontal acceleration applied to a particle.- See Also:
-
DEFAULT_MIN_ACCELERATION_Y
public static final float DEFAULT_MIN_ACCELERATION_YDefault minimum vertical acceleration applied to a particle.- See Also:
-
DEFAULT_MAX_ACCELERATION_Y
public static final float DEFAULT_MAX_ACCELERATION_YDefault maximum vertical acceleration applied to a particle.- See Also:
-
DEFAULT_MIN_ANGLE
public static final float DEFAULT_MIN_ANGLEDefault minimum starting angle in degrees of a spawned particle.- See Also:
-
DEFAULT_MAX_ROTATION
public static final float DEFAULT_MAX_ROTATIONDefault maximum starting angle in degrees of a spawned particle.- See Also:
-
DEFAULT_MIN_DELTA_ANGLE
public static final float DEFAULT_MIN_DELTA_ANGLEDefault minimum angle delta applied per update to a particle.- See Also:
-
DEFAULT_MAX_DELTA_ANGLE
public static final float DEFAULT_MAX_DELTA_ANGLEDefault maximum angle delta applied per update to a particle.- See Also:
-
DEFAULT_MIN_VELOCITY_X
public static final float DEFAULT_MIN_VELOCITY_XDefault minimum horizontal velocity of a spawned particle.- See Also:
-
DEFAULT_MAX_VELOCITY_X
public static final float DEFAULT_MAX_VELOCITY_XDefault maximum horizontal velocity of a spawned particle.- See Also:
-
DEFAULT_MIN_VELOCITY_Y
public static final float DEFAULT_MIN_VELOCITY_YDefault minimum vertical velocity of a spawned particle.- See Also:
-
DEFAULT_MAX_VELOCITY_Y
public static final float DEFAULT_MAX_VELOCITY_YDefault maximum vertical velocity of a spawned particle.- See Also:
-
DEFAULT_MIN_OUTLINETHICKNESS
public static final float DEFAULT_MIN_OUTLINETHICKNESSDefault minimum outline thickness for outline-rendered particles.- See Also:
-
DEFAULT_MAX_OUTLINETHICKNESS
public static final float DEFAULT_MAX_OUTLINETHICKNESSDefault maximum outline thickness for outline-rendered particles.- See Also:
-
DEFAULT_MIN_WIDTH
public static final float DEFAULT_MIN_WIDTHDefault minimum width of a spawned particle.- See Also:
-
DEFAULT_MAX_WIDTH
public static final float DEFAULT_MAX_WIDTHDefault maximum width of a spawned particle.- See Also:
-
DEFAULT_MIN_HEIGHT
public static final float DEFAULT_MIN_HEIGHTDefault minimum height of a spawned particle.- See Also:
-
DEFAULT_MAX_HEIGHT
public static final float DEFAULT_MAX_HEIGHTDefault maximum height of a spawned particle.- See Also:
-
-
Constructor Details
-
EmitterAttributes
public EmitterAttributes()Creates a newEmitterAttributesinstance and initializes allRangeAttributefields and other defaults required for the emitter to be rendered and updated correctly.
-
-
Method Details
-
getAlphaVariance
public float getAlphaVariance()Gets the per-particle alpha variance.- Returns:
- the alpha variance in the range
[0, 1]
-
setAlphaVariance
public void setAlphaVariance(float alphaVariance) Sets the per-particle alpha variance. The value is clamped to the range[0, 1].- Parameters:
alphaVariance- the alpha variance to set
-
getCollision
-
setCollision
-
getRequiredQuality
-
setRequiredQuality
-
getColorVariance
public float getColorVariance()Gets the per-particle color variance.- Returns:
- the color variance in the range
[0, 1]
-
setColorVariance
public void setColorVariance(float colorVariance) Sets the per-particle color variance. The value is clamped to the range[0, 1].- Parameters:
colorVariance- the color variance to set
-
getColors
-
getDecodedColors
Gets the decodedColorlist derived from the configured color strings. The result is cached after the first call.- Returns:
- the decoded colors, falling back to
DEFAULT_COLORfor entries that cannot be decoded
-
setColors
-
setColors
Sets the colors used when spawning particles by encoding the given AWT colors.- Parameters:
colors- the colors to apply
-
getDeltaHeight
Gets the per-particle height delta parameter.- Returns:
- the height delta
RangeAttribute
-
setDeltaHeight
Sets the per-particle height delta parameter.- Parameters:
deltaHeight- the height delta parameter to set
-
getDeltaWidth
Gets the per-particle width delta parameter.- Returns:
- the width delta
RangeAttribute
-
setDeltaWidth
Sets the per-particle width delta parameter.- Parameters:
deltaWidth- the width delta parameter to set
-
getAngle
Gets the starting angle parameter for spawned particles.- Returns:
- the angle
RangeAttribute
-
setAngle
Sets the starting angle parameter for spawned particles.- Parameters:
angle- the angle parameter to set
-
getDeltaAngle
Gets the per-particle angle delta parameter.- Returns:
- the angle delta
RangeAttribute
-
getVelocityX
Gets the horizontal velocity parameter of spawned particles.- Returns:
- the horizontal velocity
RangeAttribute
-
setVelocityX
Sets the horizontal velocity parameter of spawned particles.- Parameters:
velocityX- the horizontal velocity parameter to set
-
getVelocityY
Gets the vertical velocity parameter of spawned particles.- Returns:
- the vertical velocity
RangeAttribute
-
setVelocityY
Sets the vertical velocity parameter of spawned particles.- Parameters:
velocityY- the vertical velocity parameter to set
-
getEmitterDuration
public int getEmitterDuration()Gets the emitter duration in milliseconds. A value of0means the emitter runs indefinitely.- Returns:
- the emitter duration in milliseconds
-
setEmitterDuration
public void setEmitterDuration(int emitterDuration) Sets the emitter duration in milliseconds. A value of0means the emitter runs indefinitely.- Parameters:
emitterDuration- the emitter duration in milliseconds
-
getAccelerationX
Gets the horizontal acceleration parameter of spawned particles.- Returns:
- the horizontal acceleration
RangeAttribute
-
setAccelerationX
Sets the horizontal acceleration parameter of spawned particles.- Parameters:
accelerationX- the horizontal acceleration parameter to set
-
getAccelerationY
Gets the vertical acceleration parameter of spawned particles.- Returns:
- the vertical acceleration
RangeAttribute
-
setAccelerationY
Sets the vertical acceleration parameter of spawned particles.- Parameters:
accelerationY- the vertical acceleration parameter to set
-
getOutlineThickness
Gets the outline thickness parameter applied to outline-rendered particles.- Returns:
- the outline thickness
RangeAttribute
-
setOutlineThickness
Sets the outline thickness parameter applied to outline-rendered particles.- Parameters:
outlineThickness- the outline thickness parameter to set
-
getHeight
public float getHeight()Gets the height of the emitter in pixels.- Returns:
- the emitter height
-
setHeight
public void setHeight(float height) Sets the height of the emitter in pixels.- Parameters:
height- the emitter height to set
-
getMaxParticles
public int getMaxParticles()Gets the maximum number of concurrently alive particles allowed for this emitter.- Returns:
- the maximum number of particles
-
setMaxParticles
public void setMaxParticles(int maxParticles) Sets the maximum number of concurrently alive particles allowed for this emitter.- Parameters:
maxParticles- the maximum number of particles
-
getName
-
setName
-
getOriginAlign
Gets the horizontal alignment of the emitter origin.- Returns:
- the horizontal origin alignment
-
setOriginAlign
Sets the horizontal alignment of the emitter origin.- Parameters:
align- the horizontal origin alignment to set
-
getOriginValign
Gets the vertical alignment of the emitter origin.- Returns:
- the vertical origin alignment
-
setOriginValign
Sets the vertical alignment of the emitter origin.- Parameters:
valign- the vertical origin alignment to set
-
getParticleHeight
Gets the per-particle height parameter.- Returns:
- the particle height
RangeAttribute
-
setParticleHeight
Sets the per-particle height parameter.- Parameters:
particleHeight- the particle height parameter to set
-
getParticleTTL
Gets the particle time-to-live (TTL) parameter, in milliseconds.- Returns:
- the particle TTL
RangeAttribute
-
setParticleTTL
Sets the particle time-to-live (TTL) parameter, in milliseconds.- Parameters:
particleTTL- the particle TTL parameter to set
-
getTexts
-
setTexts
-
getParticleType
Gets the particle type (shape) used when spawning particles.- Returns:
- the particle type
-
setParticleType
Sets the particle type (shape) used when spawning particles.- Parameters:
particleType- the particle type to set
-
getParticleWidth
Gets the per-particle width parameter.- Returns:
- the particle width
RangeAttribute
-
setParticleWidth
Sets the per-particle width parameter.- Parameters:
particleWidth- the particle width parameter to set
-
getParticleOffsetX
Gets the horizontal spawn offset parameter relative to the emitter origin.- Returns:
- the horizontal offset
RangeAttribute
-
setParticleOffsetX
Sets the horizontal spawn offset parameter relative to the emitter origin.- Parameters:
x- the horizontal offset parameter to set
-
getParticleOffsetY
Gets the vertical spawn offset parameter relative to the emitter origin.- Returns:
- the vertical offset
RangeAttribute
-
setParticleOffsetY
Sets the vertical spawn offset parameter relative to the emitter origin.- Parameters:
y- the vertical offset parameter to set
-
getSpawnAmount
public int getSpawnAmount()Gets the number of particles that are spawned per spawn tick.- Returns:
- the spawn amount
-
setSpawnAmount
public void setSpawnAmount(int spawnAmount) Sets the number of particles that are spawned per spawn tick.- Parameters:
spawnAmount- the spawn amount to set
-
getSpawnRate
public int getSpawnRate()Gets the spawn rate in milliseconds between spawn ticks.- Returns:
- the spawn rate
-
setSpawnRate
public void setSpawnRate(int spawnRate) Sets the spawn rate in milliseconds between spawn ticks.- Parameters:
spawnRate- the spawn rate to set
-
getSpritesheet
Gets the name of the spritesheet used by sprite-based particles.- Returns:
- the spritesheet name
-
setSpritesheet
Sets the name of the spritesheet used by sprite-based particles.- Parameters:
spritesheetName- the spritesheet name
-
setSpritesheet
Sets the spritesheet used by sprite-based particles using aSpritesheetreference.- Parameters:
spritesheet- the spritesheet whose name will be stored
-
getUpdateRate
public int getUpdateRate()Gets the update rate of the emitter in milliseconds.- Returns:
- the update rate
-
setUpdateRate
public void setUpdateRate(int updateRate) Sets the update rate of the emitter in milliseconds. A value of0is ignored.- Parameters:
updateRate- the update rate to set
-
getWidth
public float getWidth()Gets the width of the emitter in pixels.- Returns:
- the emitter width
-
setWidth
public void setWidth(float width) Sets the width of the emitter in pixels.- Parameters:
width- the emitter width to set
-
isAnimatingSprite
public boolean isAnimatingSprite()Returns whether sprite-based particles are animated.- Returns:
trueif sprite animation is enabled
-
isLoopingSprite
public boolean isLoopingSprite()Returns whether sprite-based particle animations are looped.- Returns:
trueif sprite looping is enabled
-
isFading
public boolean isFading()Returns whether particles fade out over their lifetime.- Returns:
trueif particles fade
-
isFadingOnCollision
public boolean isFadingOnCollision()Returns whether particles fade upon collision.- Returns:
trueif particles fade on collision
-
isOutlineOnly
public boolean isOutlineOnly()Returns whether shape-based particles are rendered as outlines only.- Returns:
trueif outline-only rendering is enabled
-
setOutlineOnly
public void setOutlineOnly(boolean outlineOnly) Sets whether shape-based particles are rendered as outlines only.- Parameters:
outlineOnly-trueto enable outline-only rendering
-
isAntiAliased
public boolean isAntiAliased()Returns whether particles are rendered with anti-aliasing.- Returns:
trueif anti-aliasing is enabled
-
setAnimateSprite
public void setAnimateSprite(boolean animateSprite) Sets whether sprite-based particles are animated.- Parameters:
animateSprite-trueto enable sprite animation
-
setLoopSprite
public void setLoopSprite(boolean loopSprite) Sets whether sprite-based particle animations are looped.- Parameters:
loopSprite-trueto enable sprite looping
-
setColor
Sets a single color used for spawning particles, replacing any previously configured colors.- Parameters:
color- the color to set
-
initDefaults
public void initDefaults()Initializes all configurable emitter and particle parameters to theirDEFAULT_*values. -
setDeltaRotation
Sets the per-particle angle delta parameter.- Parameters:
deltaRotation- the angle delta parameter to set
-
setFade
public void setFade(boolean fade) Sets whether particles fade out over their lifetime.- Parameters:
fade-trueto enable fading
-
setFadeOnCollision
public void setFadeOnCollision(boolean fadeOnCollision) Sets whether particles fade upon collision.- Parameters:
fadeOnCollision-trueto enable fade-on-collision
-
setAntiAliasing
public void setAntiAliasing(boolean antiAliasing) Sets whether particles are rendered with anti-aliasing.- Parameters:
antiAliasing-trueto enable anti-aliasing
-
setText
Sets a single text used by text-rendering particles, replacing any previously configured texts.- Parameters:
text- the text to set
-