Class CreatureShadowImageEffect
java.lang.Object
de.gurkenlabs.litiengine.graphics.ImageEffect
de.gurkenlabs.litiengine.graphics.CreatureShadowImageEffect
- All Implemented Interfaces:
ITimeToLive,Comparable<ImageEffect>
-
Constructor Summary
ConstructorsConstructorDescriptionCreatureShadowImageEffect(Creature creature) Initializes a new instance of theCreatureShadowImageEffect.CreatureShadowImageEffect(Creature creature, Color shadowColor) Initializes a new instance of theCreatureShadowImageEffect. -
Method Summary
Modifier and TypeMethodDescriptionapply(BufferedImage image) protected voiddrawShadow(Graphics2D graphics, float spriteWidth, float spriteHeight, float offsetX, float offsetY) floatfloatprotected Ellipse2DgetShadowEllipse(float spriteWidth, float spriteHeight, float offsetX, float offsetY) setOffsetX(float offsetX) setOffsetY(float offsetY) Methods inherited from class de.gurkenlabs.litiengine.graphics.ImageEffect
compareTo, getAliveTime, getName, getPriority, getTimeToLive, setName, setPriority, timeToLiveReached
-
Constructor Details
-
CreatureShadowImageEffect
Initializes a new instance of theCreatureShadowImageEffect.- Parameters:
creature- The creature to which this affect will be applied to.
-
CreatureShadowImageEffect
Initializes a new instance of theCreatureShadowImageEffect.- Parameters:
creature- The creature to which this affect will be applied to.shadowColor- The color of the shadow.
-
-
Method Details
-
getCreature
-
getOffsetX
public float getOffsetX() -
setOffsetX
-
getOffsetY
public float getOffsetY() -
setOffsetY
-
apply
- Specified by:
applyin classImageEffect
-
getShadowEllipse
protected Ellipse2D getShadowEllipse(float spriteWidth, float spriteHeight, float offsetX, float offsetY) -
drawShadow
protected void drawShadow(Graphics2D graphics, float spriteWidth, float spriteHeight, float offsetX, float offsetY)
-