expose "delete" in blocks.

fix for https://github.com/Microsoft/pxt/issues/870
This commit is contained in:
Peli de Halleux 2016-12-08 08:54:05 -08:00
parent 14f16f9b2c
commit 1649811015

View File

@ -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);