Class SpriteParticle
java.lang.Object
de.gurkenlabs.litiengine.graphics.emitters.particles.Particle
de.gurkenlabs.litiengine.graphics.emitters.particles.SpriteParticle
- All Implemented Interfaces:
ITimeToLive
public class SpriteParticle
extends Particle
Constructor Summary
Constructors Constructor Description SpriteParticle(Spritesheet spritesheet)
Method Summary
Modifier and Type Method Description java.awt.geom.Rectangle2D
getBoundingBox(java.awt.geom.Point2D origin)
Gets the current bounding box of the particle, depending on its spawn location.boolean
isAnimatingSprite()
boolean
isLoopingSprite()
void
render(java.awt.Graphics2D g, java.awt.geom.Point2D emitterOrigin)
void
setAnimateSprite(boolean animateSprite)
void
setLoopSprite(boolean loopSprite)
void
update(java.awt.geom.Point2D emitterOrigin, float updateRatio)
Updates the effect's position, change in xCurrent, change in yCurrent, remaining lifetime, and color.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, getRenderLocation, getTimeToLive, getVelocityX, getVelocityY, getWidth, getX, getY, init, isAntiAliased, isContinuousCollisionEnabled, isFading, isFadingOnCollision, isOutlineOnly, isStoppingOnCollision, setAccelerationX, setAccelerationY, setAngle, setAntiAliasing, setCollisionType, setColor, setContinuousCollision, setCustomRenderType, setDeltaAngle, setDeltaHeight, setDeltaWidth, setFade, setFadeOnCollision, setHeight, setOutlineOnly, setStopOnCollision, setTimeToLive, setVelocityX, setVelocityY, setWidth, setX, setY, timeToLiveReached, usesCustomRenderType
Constructor Details
Method Details
render
public void render(java.awt.Graphics2D g, java.awt.geom.Point2D emitterOrigin)update
public void update(java.awt.geom.Point2D emitterOrigin, float updateRatio)Description copied from class:Particle
Updates the effect's position, change in xCurrent, change in yCurrent, remaining lifetime, and color.getBoundingBox
public java.awt.geom.Rectangle2D getBoundingBox(java.awt.geom.Point2D origin)Description copied from class:Particle
Gets the current bounding box of the particle, depending on its spawn location.- Overrides:
getBoundingBox
in classParticle
- Parameters:
origin
- the spawn location of this particle- Returns:
- The Rectangular particle bounding box.
isAnimatingSprite
public boolean isAnimatingSprite()setAnimateSprite
public void setAnimateSprite(boolean animateSprite)isLoopingSprite
public boolean isLoopingSprite()setLoopSprite
public void setLoopSprite(boolean loopSprite)