Add support for entity instant animations

This commit is contained in:
2021-04-01 10:55:31 +02:00
parent fbaf422f89
commit 933d8258b7
5 changed files with 73 additions and 2 deletions

View File

@@ -34,4 +34,6 @@ public interface Entity extends Movable, Animated, Renderable, Updatable {
int getZIndex();
void setZIndex(int zIndex);
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, Runnable onFinish) {
entity.performInstantAnimation(targetFaceDirection, onFinish);
}
@Override
public boolean move(Movement movement) {
return entity.move(movement);