Skip to content

Instantly share code, notes, and snippets.

@ArnaudPiroelle
Created July 26, 2019 13:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ArnaudPiroelle/60d5a4ab54947b77f92dd339024aa7e5 to your computer and use it in GitHub Desktop.
Save ArnaudPiroelle/60d5a4ab54947b77f92dd339024aa7e5 to your computer and use it in GitHub Desktop.
onRobot {
// Get a single service
val conversation: Conversation = getService()
val osef = conversation.makeSay(robotContext, Phrase("Hello"))
// Make a simple say
val say: Say = say("Hello you !")
// Wait for focus before start a action
waitForFocus {
say.run()
subscriptions += focusOwner.onReleased {
println("Dispose all")
subscriptions.disposeAndClear()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment