Class TextParticle
java.lang.Object
de.gurkenlabs.litiengine.graphics.emitters.particles.Particle
de.gurkenlabs.litiengine.graphics.emitters.particles.TextParticle
- All Implemented Interfaces:
ITimeToLive
Represents a particle that renders text.
-
Constructor Summary
ConstructorsConstructorDescriptionTextParticle(String text) Constructs a TextParticle with the specified text. -
Method Summary
Modifier and TypeMethodDescriptiongetBoundingBox(Point2D origin) Gets the bounding box of the text particle.getFont()Gets the font used by this TextParticle.getText()Gets the text rendered by this TextParticle.voidrender(Graphics2D g, Point2D emitterOrigin) Renders the text particle.voidSets the font for this TextParticle.Methods inherited from class de.gurkenlabs.litiengine.graphics.emitters.particles.Particle
getAbsoluteLocation, getAbsoluteX, getAbsoluteY, getAccelerationX, getAccelerationY, getAliveTime, getAngle, getCollisionType, getColor, getCustomRenderType, getDeltaAngle, getDeltaHeight, getDeltaWidth, getHeight, getOpacity, getOutlineThickness, getRenderLocation, getTimeToLive, getVelocityX, getVelocityY, getWidth, getX, getY, hasRayCastCollision, init, isAntiAliased, isContinuousCollisionEnabled, isFading, isFadingOnCollision, isOutlineOnly, isStoppingOnCollision, setAccelerationX, setAccelerationY, setAngle, setAntiAliasing, setCollisionType, setColor, setContinuousCollision, setCustomRenderType, setDeltaAngle, setDeltaHeight, setDeltaWidth, setFade, setFadeOnCollision, setHeight, setOutlineOnly, setOutlineThickness, setStopOnCollision, setTimeToLive, setVelocityX, setVelocityY, setWidth, setX, setY, timeToLiveReached, update, usesCustomRenderType
-
Constructor Details
-
TextParticle
Constructs a TextParticle with the specified text.- Parameters:
text- The text to be rendered by this particle.
-
-
Method Details
-
getFont
Gets the font used by this TextParticle.- Returns:
- The font used by this TextParticle.
-
getText
Gets the text rendered by this TextParticle.- Returns:
- The text rendered by this TextParticle.
-
render
Renders the text particle. -
setFont
Sets the font for this TextParticle.- Parameters:
font- The font to set.
-
getBoundingBox
Gets the bounding box of the text particle.- Overrides:
getBoundingBoxin classParticle- Parameters:
origin- The origin point.- Returns:
- The bounding box of the text particle.
-