From 1649811015f76fcd3263070b224d0c86125f8efb Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 8 Dec 2016 08:54:05 -0800 Subject: [PATCH] expose "delete" in blocks. fix for https://github.com/Microsoft/pxt/issues/870 --- libs/core/game.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/core/game.ts b/libs/core/game.ts index f2020bde..d16642a7 100644 --- a/libs/core/game.ts +++ b/libs/core/game.ts @@ -40,7 +40,7 @@ namespace game { * @param x sprite horizontal coordinate, eg: 2 * @param y sprite vertical coordinate, eg: 2 */ - //% weight=60 + //% weight=60 blockGap=8 //% blockId=game_create_sprite block="create sprite at|x: %x|y: %y" //% parts="ledmatrix" export function createSprite(x: number, y: number): LedSprite { @@ -647,6 +647,7 @@ namespace game { * Deletes the sprite from the game engine. All further operation of the sprite will not have any effect. * @param this sprite to delete */ + //% weight=59 //% blockId="game_delete_sprite" block="delete %this" public delete(): void { sprites.removeElement(this);