class Explosion : ActionRole { static val frameNames = listOf("0", "1", "2", "3", "4", "5", "6", "6") override fun createAction() : Action { return FrameAnimation( actor, Explosion.frameNames, 0.3) then Kill( actor ) } static fun create( square : Square ) : Actor { val costume = Resources.instance.costumes.find( "explosion" ) val actor = costume.createActor() actor.x = square.worldX() actor.y = square.worldY() Game.instance.scene.findStage( "extra" ).add( actor ) return actor } static fun create( square : Square, direction : int ) : Actor { val actor = create( square ) actor.x += square.grid.gridSize * Item.getDeltaX( direction ) actor.y += square.grid.gridSize * Item.getDeltaY( direction ) return actor } }