Sets the visibility for every sprite in the group.
The default visibility is true.
var group = createGroup();
group.add(createSprite(100, 200));
group.add(createSprite(300, 200));
function draw() {
background("white");
drawSprites();
if (mouseDown("leftButton")){
group.setVisibleEach(true);
}
else {
group.setVisibleEach(false);
}
}
group.setVisibleEach(bool)
| Name | Type | Required? | Description |
|---|---|---|---|
| bool | Boolean | The visibility of the group of sprites, true or false. |
No return value. Changes output in the display after drawSprites() is called.
drawSprites() is called.Found a bug in the documentation? Let us know at documentation@code.org