Class AnimationFrame

java.lang.Object
de.pirckheimer_gymnasium.engine_pi.animation.AnimationFrame

@Internal public final class AnimationFrame extends Object
Beschreibt ein Einzelbild einer Animation.
Author:
Niklas Keller
  • Constructor Details

    • AnimationFrame

      @Internal public AnimationFrame(BufferedImage image, double duration)
      Erstellt ein Einzelbild.
      Parameters:
      image - Ein Bild, das sich bereits im Speicher befindet.
      duration - Die Dauer in Sekunden, die dieses Einzelbild aktiv bleibt.
  • Method Details

    • setDuration

      @Internal public void setDuration(double duration)
    • getImage

      @Internal public BufferedImage getImage()
    • getDuration

      @Internal public double getDuration()
    • render

      @Internal public void render(Graphics2D g, double width, double height, boolean flipHorizontal, boolean flipVertical)
      Rendert das Einzelbild (an der entsprechenden Position des Graphics Objekts)
      Parameters:
      g - Das Graphics2D-Objekt, in das gezeichnet werden soll.