pxt-calliope/docs/reference/game/delete.md
Galen Nickel 3f106307ff
Fix some titles, sigs in ref docs (#2128)
* Fix some title and sigs in ref docs

* better buffer source
2019-06-05 16:28:56 -07:00

395 B

delete

Delete a sprite from the game.

game.createSprite(0,0).delete()

Example

This program makes a sprite and shows the number of its brightness on the screen. Then, it deletes the sprite.

let ball = game.createSprite(0, 2);
basic.showNumber(ball.get(LedSpriteProperty.Brightness));
ball.delete();

See also

create sprite