Skip to content
This repository has been archived by the owner on Nov 8, 2019. It is now read-only.

Commit

Permalink
more fun with blocks and reporters
Browse files Browse the repository at this point in the history
  • Loading branch information
tballmsft committed Sep 20, 2019
1 parent e9a945b commit d83ed24
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions blockstile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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)
}
Expand All @@ -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)
}
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit d83ed24

Please sign in to comment.