Skip to content

Commit 0d20ad7

Browse files
author
github-actions
committed
style: apply google format
1 parent 2ffcc14 commit 0d20ad7

File tree

13 files changed

+297
-402
lines changed

13 files changed

+297
-402
lines changed

examples/archives/Halloween/PumpkinSprite.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import org.openpatch.scratch.extensions.animation.AnimatedSprite;;
1+
import org.openpatch.scratch.extensions.animation.AnimatedSprite;
22

33
public class PumpkinSprite extends AnimatedSprite {
44

examples/java/RandomDot/RandomDot.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ public void run() {
1818
if (this.getTimer().everyMillis(100)) {
1919
this.getPen().down();
2020
this.getPen().setSize(10);
21-
this.setPosition(
22-
Random.randomInt(-400, 400),
23-
Random.randomInt(-300, 300));
21+
this.setPosition(Random.randomInt(-400, 400), Random.randomInt(-300, 300));
2422
this.getPen().changeColor(2);
2523
this.getPen().up();
2624
}

examples/java/SmartRocket/Level.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@ public Level() {
1818
this.ziel = new Ziel();
1919
this.ziel.setPosition(100, 20);
2020
this.add(this.ziel);
21-
this.population = new Population(
22-
this,
23-
this.mutationsrate,
24-
this.populationsgroesse,
25-
new Vector2(0, -this.getHeight() + 20),
26-
this.ziel,
27-
this.lebenszeit);
21+
this.population =
22+
new Population(
23+
this,
24+
this.mutationsrate,
25+
this.populationsgroesse,
26+
new Vector2(0, -this.getHeight() + 20),
27+
this.ziel,
28+
this.lebenszeit);
2829

2930
this.statistiken = new Text();
3031
this.statistiken.setPosition(-this.getWidth() / 2 + 10, this.getHeight() / 2 - 10);

examples/java/StressTest/Character.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ public Character(String pathBase, int idleAnimations, int runAnimations, int wal
1616
this.setOnEdgeBounce(true);
1717

1818
this.tintColor = (int) this.pickRandom(0, 256);
19-
this.setPosition(
20-
this.pickRandom(-200, 200),
21-
this.pickRandom(-200, 200));
19+
this.setPosition(this.pickRandom(-200, 200), this.pickRandom(-200, 200));
2220
this.setDirection(this.pickRandom(0, 360));
2321
}
2422

examples/reference/SpriteStamp.java

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,25 @@
44
import org.openpatch.scratch.extensions.recorder.GifRecorder;
55

66
public class SpriteStamp {
7-
public SpriteStamp() {
8-
Stage myStage = new Stage(254, 100);
9-
Sprite mySprite = new Sprite("slime", "assets/slime.png");
10-
myStage.add(mySprite);
11-
GifRecorder recorder = new GifRecorder("" + this.getClass().getName() + ".gif");
12-
mySprite.setX(-80);
13-
recorder.start();
14-
myStage.wait(3000);
15-
mySprite.stamp();
16-
mySprite.changeX(50);
17-
myStage.wait(3000);
18-
mySprite.stamp();
19-
mySprite.changeX(50);
20-
myStage.wait(3000);
21-
recorder.stop();
22-
Window.getInstance().exit();
23-
}
7+
public SpriteStamp() {
8+
Stage myStage = new Stage(254, 100);
9+
Sprite mySprite = new Sprite("slime", "assets/slime.png");
10+
myStage.add(mySprite);
11+
GifRecorder recorder = new GifRecorder("" + this.getClass().getName() + ".gif");
12+
mySprite.setX(-80);
13+
recorder.start();
14+
myStage.wait(3000);
15+
mySprite.stamp();
16+
mySprite.changeX(50);
17+
myStage.wait(3000);
18+
mySprite.stamp();
19+
mySprite.changeX(50);
20+
myStage.wait(3000);
21+
recorder.stop();
22+
Window.getInstance().exit();
23+
}
2424

25-
public static void main(String[] args) {
26-
new SpriteStamp();
27-
}
25+
public static void main(String[] args) {
26+
new SpriteStamp();
27+
}
2828
}

0 commit comments

Comments
 (0)