Enable queueing entity instant animations

This commit is contained in:
2021-04-01 12:29:48 +02:00
parent 933d8258b7
commit dc472265ab
4 changed files with 24 additions and 19 deletions

View File

@@ -35,5 +35,7 @@ public interface Entity extends Movable, Animated, Renderable, Updatable {
void setZIndex(int zIndex);
void performInstantAnimation(Direction targetFaceDirection);
void performInstantAnimation(Direction targetFaceDirection, Runnable onFinish);
}

View File

@@ -265,6 +265,11 @@ public abstract class EntityDelegate implements Entity {
entity.setZIndex(zIndex);
}
@Override
public void performInstantAnimation(Direction targetFaceDirection) {
entity.performInstantAnimation(targetFaceDirection);
}
@Override
public void performInstantAnimation(Direction targetFaceDirection, Runnable onFinish) {
entity.performInstantAnimation(targetFaceDirection, onFinish);