class SceneName : ActionRole { override fun createAction() : Action { val title = PlayDirector.instance.sceneTitle val glassView = Game.instance.scene.findStageView("glass") val glassRect = glassView.worldRect() val x = (glassRect.left + glassRect.right)/2 val y = glassRect.top - 20 if (title != "") { actor.textAppearance.text = title return Delay( 1 ) then MoveTo( actor.position, 1, Vector2(x,y), Eases.easeInOut ) then Delay( 1 ) then ( ScaleTo( actor, 1, 0.4 ) and MoveBy( actor.position, 1, Vector2( 0, 15 ), Eases.easeInOut ) ) } return null } }