Gary Tierney
09/18/2017, 10:23 PMContinuation
then. I'm trying to model synchronous game actions that are updated on an interval using coroutines so I can replace logic like:
var counter = 5
fun update() {
if (counter-- > 0) {
return
}
doThings()
}
with:
suspend fun run() {
waitOnCounter(5)
doThings()
}