From 4a6ed44ba71870add781a6c3588f8adf4e2e4eec Mon Sep 17 00:00:00 2001 From: Gubolin Date: Fri, 6 Feb 2015 19:45:38 +0100 Subject: small note on reporters in threads.js --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6f59f68..e6d0308 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ If you want to do your action continuously, use a `threads.js` function. There y this.pushContext('doYield'); this.pushContext(); ``` -and your function will be called on every tick. You can save something inside the context (`this.context.test = "Hello World!"`) and it will therefore be available in the following executions. +and your function will be called on every tick. You can save something inside the context (`this.context.test = "Hello World!"`) and it will therefore be available in the following executions. A reporter can return something with `return`, this can even happen after multiple cycles. The advantage of adding your function to a `SpriteMorph` or `StageMorph` is that you can access the stage/sprite directly with `this` and the functions for either of them can variate. Drawing something on the stage -- cgit v1.3.1