/** Bars - part of a Gate or EitGate, which can be opened/closed. These are *visual* only. A Gate should call Bars.close() immediately after the Bars are created. An ExitGate should create the Bars during begin(), and then call Bars.open() when the gate is open. */ class Bars : ActionRole { fun open() { replaceAction( ScaleTo( actor, 1, Vector2(1, 0.001), Eases.easeIn ).then( Kill(actor) ) ) } fun close() { actor.scale.y = 0.001 replaceAction( ScaleTo( actor, 1, 1, Eases.easeIn ) ) } }