onClose

fun onClose(callback: suspend () -> Unit)

Adds a callback to be executed when the game is closed in normal circumstances.