diff options
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/gui/animations/Animation.java')
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/gui/animations/Animation.java | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/animations/Animation.java b/src/main/java/cc/polyfrost/oneconfig/gui/animations/Animation.java index 4040164..f85132b 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/animations/Animation.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/animations/Animation.java @@ -29,11 +29,11 @@ package cc.polyfrost.oneconfig.gui.animations; import cc.polyfrost.oneconfig.utils.gui.GuiUtils; public abstract class Animation { - private final boolean reverse; - private final float duration; - private final float start; - private final float change; - private float timePassed = 0; + protected final boolean reverse; + protected final float duration; + protected final float start; + protected final float change; + protected float timePassed = 0; /** * @param duration The duration of the animation @@ -84,5 +84,19 @@ public abstract class Animation { return reverse; } + /** + * @return The start position of the animation + */ + public float getStart() { + return start; + } + + /** + * @return The end position of the animation + */ + public float getEnd() { + return start + change; + } + protected abstract float animate(float x); } |