public class CreatureShadowImageEffect extends ImageEffect
Constructor and Description |
---|
CreatureShadowImageEffect(Creature creature)
Initializes a new instance of the
CreatureShadowImageEffect . |
CreatureShadowImageEffect(Creature creature,
java.awt.Color shadowColor)
Initializes a new instance of the
CreatureShadowImageEffect . |
Modifier and Type | Method and Description |
---|---|
java.awt.image.BufferedImage |
apply(java.awt.image.BufferedImage image) |
protected void |
drawShadow(java.awt.Graphics2D graphics,
float spriteWidth,
float spriteHeight,
float offsetX,
float offsetY) |
Creature |
getCreature() |
float |
getOffsetX() |
float |
getOffsetY() |
protected java.awt.geom.Ellipse2D |
getShadowEllipse(float spriteWidth,
float spriteHeight,
float offsetX,
float offsetY) |
CreatureShadowImageEffect |
setOffsetX(float offsetX) |
CreatureShadowImageEffect |
setOffsetY(float offsetY) |
compareTo, getAliveTime, getName, getPriority, getTimeToLive, setName, setPriority, timeToLiveReached
public CreatureShadowImageEffect(Creature creature)
CreatureShadowImageEffect
.creature
- The creature to which this affect will be applied to.public CreatureShadowImageEffect(Creature creature, java.awt.Color shadowColor)
CreatureShadowImageEffect
.creature
- The creature to which this affect will be applied to.shadowColor
- The color of the shadow.public Creature getCreature()
public float getOffsetX()
public CreatureShadowImageEffect setOffsetX(float offsetX)
public float getOffsetY()
public CreatureShadowImageEffect setOffsetY(float offsetY)
public java.awt.image.BufferedImage apply(java.awt.image.BufferedImage image)
apply
in class ImageEffect
protected java.awt.geom.Ellipse2D getShadowEllipse(float spriteWidth, float spriteHeight, float offsetX, float offsetY)
protected void drawShadow(java.awt.Graphics2D graphics, float spriteWidth, float spriteHeight, float offsetX, float offsetY)