Skip to content

Commit e85f9a2

Browse files
committed
Add additional game
1 parent c1d8dd8 commit e85f9a2

34 files changed

Lines changed: 641 additions & 9 deletions

build.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
maven.home=C:\\Program Files\\Maven\\3.3.3
2+
ant.home=C:\\Program Files\\Ant\\1.9.3
3+
java.home=C:\\Program Files\\Java\\jdk1.8.0_60
4+
build.version=1.0.2

build.xml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project>
3-
<property name="MAVEN_HOME" value="C:\Program Files\Maven\3.3.3" />
4-
<property name="ANT_HOME" value="C:\Program Files\Ant\1.9.3" />
5-
<property name="JAVA_HOME" value="C:\Program Files\Java\jdk1.8.0_60" />
6-
<exec executable="${MAVEN_HOME}\bin\mvn.cmd">
2+
<project>
3+
<property file="build.properties"/>
4+
<echo message="${build.version}"/>
5+
<echo message="${maven.home}"/>
6+
<echo message="${java.home}"/>
7+
<echo message="${ant.home}"/>
8+
<exec executable="${maven.home}\bin\mvn.cmd">
79
<arg value="clean" />
810
<arg value="install" />
911
<arg value="-DskipTests" />
1012
</exec>
1113
<delete file="../snap-release/snapd.jar" />
12-
<copy file="snap-develop/target/snap-develop-1.0.2-jar-with-dependencies.jar" tofile="../snap-release/snapd.jar" overwrite="true" />
13-
<exec executable="${ANT_HOME}\bin\ant.bat">
14+
<copy file="snap-develop/target/snap-develop-${build.version}-jar-with-dependencies.jar" tofile="../snap-release/snapd.jar" overwrite="true" />
15+
<copy file="snap-agent/target/snap-agent-${build.version}-jar-with-dependencies.jar" tofile="../snap-release/snapa.jar" overwrite="true" />
16+
<exec executable="${ant.home}\bin\ant.bat">
1417
<arg value="-f" />
1518
<arg value="snap-service\build.xml" />
1619
</exec>
1720
<delete file="../snap-release/snap.jar" />
1821
<copy file="snap-service/jar/snap.jar" tofile="../snap-release/snap.jar" overwrite="true" />
19-
<exec executable="${JAVA_HOME}\bin\java.exe">
22+
<exec executable="${java.home}\bin\java.exe">
2023
<arg value="-jar" />
2124
<arg value="..\snap-release\snapd.jar" />
2225
<arg value="--mode=develop"/>

snap-develop/src/main/resources/resource/ts/commands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ function runScript() {
231231
breakpoints : editorData.breakpoints,
232232
project : document.title,
233233
resource : editorData.resource.filePath,
234-
//system: waitingProcessSystem,
234+
system: waitingProcessSystem,
235235
source : editorData.source,
236236
});
237237
socket.send("EXECUTE:" + message);
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
2+
import android.content.Context;
3+
import android.graphics.Bitmap;
4+
import android.graphics.BitmapFactory;
5+
6+
class Bird {
7+
8+
const resources = ["/flappybird/resources/bird0_0.png",
9+
"/flappybird/resources/bird0_1.png",
10+
"/flappybird/resources/bird0_2.png"];
11+
12+
const birdBitmaps = [];
13+
const context;
14+
15+
new(context){
16+
this.context = context;
17+
}
18+
19+
get(value) {
20+
if(birdBitmaps.isEmpty()) {
21+
for(var resource in resources){
22+
var bitmap = ImageStore.loadImage(resource);
23+
birdBitmaps.add(bitmap);
24+
}
25+
}
26+
return birdBitmaps.get(value);
27+
}
28+
29+
recycle(){
30+
for (var bitmap in birdBitmaps) {
31+
bitmap.recycle();
32+
}
33+
}
34+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// https://github.com/uin3566/FlappyBird
2+
var panel = new GamePanel(context);
3+
game.start(panel);

0 commit comments

Comments
 (0)