/** */ class Pause : ActionRole { @Attribute( about="How much to move by to move from off-screen to the correct position" ) val moveBy = Vector2(0, -300) @Attribute( about="The time it takes the animation to move into the correct position" ) var seconds = 2.0 val initialPosition = Vector2() override fun begin() { initialPosition.set( actor.position ) actor.hide() } fun show() { actor.event("default") replaceAction( MoveTo(actor.position, seconds, initialPosition + moveBy, Eases.easeOut) ) } fun hide() { replaceAction( MoveTo(actor.position, seconds, initialPosition, Eases.easeIn) thenOnce actor:>hide ) } }