From d83ed24627a87b90a4f516fdcc3ac9dab6ace991 Mon Sep 17 00:00:00 2001 From: Tom Ball Date: Fri, 20 Sep 2019 16:07:07 -0700 Subject: [PATCH] more fun with blocks and reporters --- blockstile.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/blockstile.ts b/blockstile.ts index 8051d35..b1637db 100644 --- a/blockstile.ts +++ b/blockstile.ts @@ -63,7 +63,7 @@ namespace TileWorld { */ //% group="Events" //% blockId=TWontilestationary block="on %code=colorindexpicker at rest" - //% blockAllowMultiple=1 + //% blockAllowMultiple=1 draggableParameters="reporter" export function onTileStationary(code: number, h: (tile: TileSprite) => void) { myWorld.onTileStationary(code, h); } @@ -73,7 +73,7 @@ namespace TileWorld { */ //% group="Events" //% blockId=TWontilearrived block="on %code=colorindexpicker arrived" - //% blockAllowMultiple=1 + //% blockAllowMultiple=1 draggableParameters="reporter" export function onTileArrived(code: number, h: (tile: TileSprite, direction: TileDir) => void) { myWorld.onTileArrived(code, h) } @@ -83,7 +83,7 @@ namespace TileWorld { */ //% group="Events" //% blockId=TWontiletransition block="on %code=colorindexpicker transition" - //% blockAllowMultiple=1 + //% blockAllowMultiple=1 draggableParameters="reporter" export function onTileTransition(code: number, h: (tile: TileSprite, col: number, row: number) => void) { myWorld.onTileTransition(code, h) } @@ -119,6 +119,9 @@ namespace TileWorld { } // actions + //% blockId=TWsettilecode block="set code %ts to %code" + //% draggableParameters = "reporter" + //% group="Actions" export function setTileCode(ts: TileSprite, code: number) { myWorld.setCode(ts, code) }