Add isDeleted (#2445)
This commit is contained in:
committed by
Peli de Halleux
parent
a10a69b96c
commit
19dffde1a8
@ -695,7 +695,7 @@ namespace game {
|
||||
* Deletes the sprite from the game engine. The sprite will no longer appear on the screen or interact with other sprites.
|
||||
* @param this sprite to delete
|
||||
*/
|
||||
//% weight=59 help=game/delete
|
||||
//% weight=59 blockGap=8 help=game/delete
|
||||
//% blockId="game_delete_sprite" block="delete %this(sprite)"
|
||||
public delete(): void {
|
||||
this._enabled = false;
|
||||
@ -703,6 +703,15 @@ namespace game {
|
||||
plot();
|
||||
}
|
||||
|
||||
/**
|
||||
* Reports whether the sprite has been deleted from the game engine.
|
||||
*/
|
||||
//% weight=58 help=game/is-deleted
|
||||
//% blockId="game_sprite_is_deleted" block="is %sprite|deleted"
|
||||
public isDeleted(): boolean {
|
||||
return !this._enabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the blink duration interval in millisecond.
|
||||
* @param sprite TODO
|
||||
|
Reference in New Issue
Block a user