Sprite::think()
A thought bubble appears over the sprite and will only go away if the sprite thinks or thinks something else.
Examples

import org.openpatch.scratch.Sprite;
import org.openpatch.scratch.Stage;
import org.openpatch.scratch.Window;
public class SpriteThink {
public SpriteThink() {
Stage myStage = new Stage(254, 100);
Sprite zeta = new Sprite("green", "assets/zeta_green_badge.png");
myStage.add(zeta);
zeta.think("Hi! I'm Zeta and can think line breaks");
myStage.wait(1000);
Window.getInstance().exit();
}
public static void main(String[] args) {
new SpriteThink();
}
}
Syntax
Java
.think(text)
.think(text, milliseconds)
Scratch
Parameters
Name | Data Type | Description |
---|---|---|
text | String | Text for the speech bubble. |
milliseconds | int | Time for the speech bubble to stay. |
Return
void