Stage::run()
Diese Methode wird in jedem Frame ausgeführt. Diese Methode funktioniert ähnlich zu einem 'wiederhole fortlaufend'-Block innerhalb des 'Wenn grüne Flagge angeklickt wird'-Blocks.
Beispiele

import org.openpatch.scratch.*;
public class StageRun {
class CustomStage extends Stage {
public CustomStage() {
super(600, 240);
this.setColor(255, 0, 0);
}
public void run() {
this.changeColor(0.5);
}
}
public StageRun() {
Stage myStage = new CustomStage();
while (myStage.getTimer().forMillis(3000))
;
myStage.exit();
}
public static void main(String[] args) {
new StageRun();
}
}
Syntax
Java
void run()
Scratch
run :: hat
Rückgabe
void