2017-08-11 02:52:43 +02:00
|
|
|
# delete
|
|
|
|
|
|
|
|
Delete a sprite from the game.
|
|
|
|
|
|
|
|
```sig
|
2019-06-06 01:28:56 +02:00
|
|
|
game.createSprite(0,0).delete()
|
2017-08-11 02:52:43 +02:00
|
|
|
```
|
|
|
|
|
2019-06-06 01:28:56 +02:00
|
|
|
## Example
|
2017-08-11 02:52:43 +02:00
|
|
|
|
|
|
|
This program makes a sprite and shows the number of its brightness on the screen. Then, it deletes the sprite.
|
|
|
|
|
|
|
|
```blocks
|
|
|
|
let ball = game.createSprite(0, 2);
|
|
|
|
basic.showNumber(ball.get(LedSpriteProperty.Brightness));
|
|
|
|
ball.delete();
|
|
|
|
```
|
|
|
|
|
2019-06-06 01:28:56 +02:00
|
|
|
## See also
|
2017-08-11 02:52:43 +02:00
|
|
|
|
|
|
|
[create sprite](/reference/game/create-sprite)
|