// Change an Actor's role to Dying, and it will gradually fade, and then die. class Dying : ActionRole { override fun createAction() : Action { return ( Fade( actor.color, 0.5, 0, Eases.linear ) and ScaleTo( actor, 0.5, 4, Eases.easeIn ) ) then Kill( actor ) } }