2.1.28, initiation update to PXT v5.28.24 (#54)
This commit is contained in:
committed by
Peli de Halleux
parent
38a964516e
commit
5c114a0c57
21
docs/reference/game/delete.md
Normal file
21
docs/reference/game/delete.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# delete
|
||||
|
||||
Delete a sprite from the game.
|
||||
|
||||
```sig
|
||||
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.
|
||||
|
||||
```blocks
|
||||
let ball = game.createSprite(0, 2);
|
||||
basic.showNumber(ball.get(LedSpriteProperty.Brightness));
|
||||
ball.delete();
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
[create sprite](/reference/game/create-sprite)
|
||||
Reference in New Issue
Block a user