Stage::remove()
Remove a drawable for example a sprite to the stage
Examples
import org.openpatch.scratch.*;
public class StageRemove {
public StageRemove() {
Stage myStage = new Stage(600, 240);
Sprite gamma = new Sprite("gamma", "assets/gamma_purple_badge.png");
myStage.add(gamma);
myStage.wait(2000);
myStage.remove(gamma);
myStage.wait(2000);
myStage.exit();
}
public static void main(String[] args) {
new StageRemove();
}
}
Syntax
Java
.remove(sprite)
Scratch
Parameters
Name | Data Type | Description |
---|---|---|
sprite | Drawable | A reference to a drawable. For example a sprite. |
Return
void