Skip to content

Commit 74638a9

Browse files
committed
Merge branch 'main' of github.com:openpatch/scratch-for-java
2 parents 6f85209 + 7665017 commit 74638a9

File tree

8 files changed

+189
-270
lines changed

8 files changed

+189
-270
lines changed

examples/java/Tiled/Tiled.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public static void main(String[] args) {
2121
Window.TEXTURE_SAMPLING_MODE = 2;
2222
Text.DEFAULT_FONT = "Tiled/assets/Retro Gaming.ttf";
2323
Text.DEFAULT_FONT_SIZE = 11;
24-
Text.FONT_SIZES = new int[] { 11 };
24+
Text.FONT_SIZES = new int[] {11};
2525
Text.SPEAK_BUBBLE_MAX_LIMIT = 200;
2626
Text.SMOOTHING = false;
2727

examples/java/Tiled/World.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,11 @@ public World(String mapFile, Player player) {
4545
}
4646
} else if ("enemy".equals(object.type)) {
4747
switch (object.name) {
48-
case "bamboo": {
49-
this.add(new Bamboo(object.x, object.y));
50-
break;
51-
}
48+
case "bamboo":
49+
{
50+
this.add(new Bamboo(object.x, object.y));
51+
break;
52+
}
5253
}
5354
}
5455
}

examples/reference/OperatorsLerp/MyStage.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@ public MyStage() {
1717

1818
public void run() {
1919
var currentMillis = Timer.millis();
20-
var x = Operators.lerp(
21-
0, this.getWidth() / 2.0, (currentMillis - startMillis) / 3000.0);
22-
var y = Operators.lerp(
23-
0, this.getHeight() / 2.0, (currentMillis - startMillis) / 3000.0);
20+
var x = Operators.lerp(0, this.getWidth() / 2.0, (currentMillis - startMillis) / 3000.0);
21+
var y = Operators.lerp(0, this.getHeight() / 2.0, (currentMillis - startMillis) / 3000.0);
2422
myPen.setPosition(x, y);
2523
System.out.println(x);
2624
System.out.println(this.getWidth());

src/org/openpatch/scratch/Sprite.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,8 @@ public Stage getStage() {
204204
* @param vertexShaderPath the path to the vertex shader file
205205
* @return the shader
206206
*/
207-
public Shader addShader(String name, final String fragmentShaderPath, final String vertexShaderPath) {
207+
public Shader addShader(
208+
String name, final String fragmentShaderPath, final String vertexShaderPath) {
208209
for (Shader shader : this.shaders) {
209210
if (shader.getName().equals(name)) {
210211
return shader;
@@ -347,7 +348,7 @@ public void addCostume(
347348
}
348349

349350
/**
350-
* Adds all tiles from a spritesheet as costumes. The costumes will be named by
351+
* Adds all tiles from a spritesheet as costumes. The costumes will be name by
351352
* the prefix and the
352353
* index in the spritesheet.
353354
* For example if the prefix is "tile" and the spritesheet contains 4 tiles,

0 commit comments

Comments
 (0)