From 2c0fdc322557a9d91c694e2a45e1b7a1addc765f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Sat, 13 Oct 2018 21:33:13 +0200 Subject: add DelayAnimation --- .../gdx/boardgame/animations/DelayAnimation.java | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 core/src/ch/asynk/gdx/boardgame/animations/DelayAnimation.java diff --git a/core/src/ch/asynk/gdx/boardgame/animations/DelayAnimation.java b/core/src/ch/asynk/gdx/boardgame/animations/DelayAnimation.java new file mode 100644 index 0000000..8baa9b1 --- /dev/null +++ b/core/src/ch/asynk/gdx/boardgame/animations/DelayAnimation.java @@ -0,0 +1,26 @@ +package ch.asynk.gdx.boardgame.animations; + +import com.badlogic.gdx.graphics.g2d.Batch; + +import ch.asynk.gdx.boardgame.Drawable; + +public class DelayAnimation extends TimedAnimation +{ + private Drawable drawable; + + public DelayAnimation(Drawable drawable, float duration) + { + this.drawable = drawable; + setDuration(duration); + } + + @Override protected void begin() { } + @Override protected void end() { } + @Override protected void update(float percent) { } + @Override public void dispose() { } + + @Override public void draw(Batch batch) + { + drawable.draw(batch); + } +} -- cgit v1.1-2-g2b99