class FramesPerSecond : ActionRole { override fun createAction() = (Delay(1) thenOnce this:>update).forever() fun update() { actor.textAppearance.text = "${Game.instance.gameLoop.actualFPS().toInt()}" Game.instance.gameLoop.resetStats() } }