Skip to content

Commit d4aa8b0

Browse files
committed
add tiled extension and fix some bugs
1 parent 1953af5 commit d4aa8b0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1424
-381
lines changed

.classpath

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="src" path="examples/reference"/>
5+
<classpathentry kind="lib" path="libs/core-4.2.1.jar"/>
6+
<classpathentry kind="lib" path="libs/gluegen-rt.jar"/>
7+
<classpathentry kind="lib" path="libs/guava-mini-0.1.6.jar"/>
8+
<classpathentry kind="lib" path="libs/jackson-annotations-2.15.2.jar"/>
9+
<classpathentry kind="lib" path="libs/jackson-core-2.15.2.jar"/>
10+
<classpathentry kind="lib" path="libs/jackson-databind-2.15.2.jar"/>
11+
<classpathentry kind="lib" path="libs/jackson-dataformat-xml-2.15.2.jar"/>
12+
<classpathentry kind="lib" path="libs/javamp3-1.0.4.jar"/>
13+
<classpathentry kind="lib" path="libs/jogl-all.jar"/>
14+
<classpathentry kind="lib" path="libs/jssc-2.9.4.jar"/>
15+
<classpathentry kind="lib" path="libs/jsyn-20171016.jar"/>
16+
<classpathentry kind="lib" path="libs/serial-3.3.7.jar"/>
17+
<classpathentry kind="lib" path="libs/sound.jar"/>
18+
<classpathentry kind="lib" path="libs/stax2-api-4.2.1.jar"/>
19+
<classpathentry kind="lib" path="libs/woodstox-core-6.5.1.jar"/>
20+
<classpathentry kind="lib" path="libs/word-wrap-0.1.12.jar"/>
21+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
22+
<classpathentry kind="output" path="bin"/>
23+
</classpath>

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.vscode
22
.idea
3+
.settings
34
bin
45
tmp
56
distribution

.project

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,28 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
3-
<name>main</name>
4-
<comment/>
5-
<projects/>
3+
<name>scratch4j</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
67
<buildSpec>
78
<buildCommand>
89
<name>org.eclipse.jdt.core.javabuilder</name>
9-
<arguments/>
10+
<arguments>
11+
</arguments>
1012
</buildCommand>
1113
</buildSpec>
1214
<natures>
1315
<nature>org.eclipse.jdt.core.javanature</nature>
1416
</natures>
15-
</projectDescription>
17+
<filteredResources>
18+
<filter>
19+
<id>1694867546882</id>
20+
<name></name>
21+
<type>30</type>
22+
<matcher>
23+
<id>org.eclipse.core.resources.regexFilterMatcher</id>
24+
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
25+
</matcher>
26+
</filter>
27+
</filteredResources>
28+
</projectDescription>

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ name: Changelog
33
index: 4
44
---
55

6+
## 4.1.0
7+
8+
- 🚀 Feat: New extension tiled.
9+
- 🐛 Fix: Fix isTouchingMousePointer.
10+
611
## 4.0.2
712

813
- 🐛 Fix: Missing stamp method on Sprite
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
public class ExampleSettings {
2+
public String name;
3+
public int groesse;
4+
}

examples/java/Saving/Saving.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
package examples.Cat;
2-
31
import org.openpatch.scratch.extensions.fs.*;
42

53
public class Saving {
64

75
public Saving() {
8-
var settings = new Settings("Hi", 10);
9-
File.save("settings", settings);
6+
var settings = new ExampleSettings();
7+
settings.name = "Hi";
8+
settings.groesse = 10;
9+
File.save("settings.json", settings);
1010

11-
var loadedSettings = File.load("settings", Settings.class);
11+
var loadedSettings = File.load("settings.json", ExampleSettings.class);
1212
System.out.println(loadedSettings.name);
1313
}
1414

examples/java/Saving/Settings.java

Lines changed: 0 additions & 9 deletions
This file was deleted.

examples/java/Saving/settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"name": "Hi",
3-
"groesse": 10
2+
"name" : "Hi",
3+
"groesse" : 10
44
}

examples/java/Sensing/Sensing.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
import java.awt.geom.Ellipse2D;
12
import org.openpatch.scratch.KeyCode;
23
import org.openpatch.scratch.Sprite;
34
import org.openpatch.scratch.Stage;
45
import org.openpatch.scratch.Window;
6+
import org.openpatch.scratch.extensions.hitbox.Hitbox;
57

68
public class Sensing extends Stage {
79
public static Hero h, m;
@@ -49,9 +51,12 @@ public MovableHero() {
4951
super();
5052
this.setPosition(-100, -100);
5153
this.setDirection(0);
54+
var hb = new Hitbox(new Ellipse2D.Double(0, 0, 615, 570));
55+
this.setHitbox(hb);
5256
}
5357

5458
public void run() {
59+
super.run();
5560
if (this.isKeyPressed(KeyCode.VK_SPACE)) {
5661
this.move(1);
5762
}

examples/java/SmartRocket/Target.java renamed to examples/java/SmartRocket/Ziel.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import org.openpatch.scratch.*;
22

3-
public class Target extends Sprite {
3+
public class Ziel extends Sprite {
44

5-
public Target() {
5+
public Ziel() {
66
this.addCostume("target", "assets/target.png");
77
this.setHitbox(10, 38, 10, 10, 38, 10, 38, 38);
88
}

0 commit comments

Comments
 (0)