package dev.resent.animation; public enum Direction { FORWARDS, BACKWARDS; public Direction opposite() { if (this == Direction.FORWARDS) { return Direction.BACKWARDS; } else return Direction.FORWARDS; } }