Scratch für Java

Sprite::goToFrontLayer()

Verschiebt die Figur in die vorderste Ebene.

Beispiele

import org.openpatch.scratch.*;
 
public class SpriteGoToFrontLayer {
  public SpriteGoToFrontLayer() {
    Stage myStage = new Stage(600, 240);
 
    Sprite gamma = new Sprite("gamma", "assets/gamma_purple_badge.png");
    myStage.add(gamma);
    myStage.add(new Sprite("zeta", "assets/zeta_green_badge.png"));
    myStage.add(new Sprite("zeta", "assets/zeta_green_badge.png"));
    myStage.add(new Sprite("zeta", "assets/zeta_green_badge.png"));
    myStage.add(new Sprite("zeta", "assets/zeta_green_badge.png"));
    myStage.add(new Sprite("zeta", "assets/zeta_green_badge.png"));
 
    myStage.wait(1000);
    gamma.goToFrontLayer();
    myStage.wait(1000);
    myStage.exit();
  }
 
  public static void main(String[] args) {
    new SpriteGoToFrontLayer();
  }
}
 

Auf GitHub anschauen

Syntax

Java

.goToFrontLayer()

Scratch

go to [back v] layer

Rückgabe

void

goToFrontLayer()