Create onFinish Animation hook

This commit is contained in:
2021-03-21 10:58:11 +01:00
parent 11664d809a
commit 83c2bff771
4 changed files with 13 additions and 0 deletions

View File

@@ -99,6 +99,11 @@ public class DefaultAnimation extends MovableSprite implements Animation {
this.isObjectLayer = layer instanceof ObjectLayer;
}
@Override
public void onFinish(Layer layer) {
// do nothing
}
@Override
public void finish() {
this.forcedFinish = true;

View File

@@ -48,6 +48,7 @@ public abstract class BaseLayer implements Layer, Updatable {
if (animation.finished()) {
iterator.remove();
animation.onFinish(this);
}
}
}