Class CreatureShadowImageEffect

java.lang.Object
de.gurkenlabs.litiengine.graphics.ImageEffect
de.gurkenlabs.litiengine.graphics.CreatureShadowImageEffect
All Implemented Interfaces:
ITimeToLive, Comparable<ImageEffect>

public class CreatureShadowImageEffect extends ImageEffect
  • Constructor Details

    • CreatureShadowImageEffect

      public CreatureShadowImageEffect(Creature creature)
      Initializes a new instance of the CreatureShadowImageEffect.
      Parameters:
      creature - The creature to which this affect will be applied to.
    • CreatureShadowImageEffect

      public CreatureShadowImageEffect(Creature creature, Color shadowColor)
      Initializes a new instance of the CreatureShadowImageEffect.
      Parameters:
      creature - The creature to which this affect will be applied to.
      shadowColor - The color of the shadow.
  • Method Details

    • getCreature

      public Creature getCreature()
    • getOffsetX

      public float getOffsetX()
    • setOffsetX

      public CreatureShadowImageEffect setOffsetX(float offsetX)
    • getOffsetY

      public float getOffsetY()
    • setOffsetY

      public CreatureShadowImageEffect setOffsetY(float offsetY)
    • apply

      public BufferedImage apply(BufferedImage image)
      Specified by:
      apply in class ImageEffect
    • 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)