From c34abe68ed906751918a044820083c3509ccee05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=A0=E7=9A=84Gitea=E7=94=A8=E6=88=B7=E5=90=8D?= <你的邮箱> Date: Wed, 17 Sep 2025 10:26:40 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E9=A6=96=E6=AC=A1=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=EF=BC=9A=E5=88=9D=E5=A7=8B=E5=8C=96=E9=A1=B9=E7=9B=AE=EF=BC=8C?= =?UTF-8?q?=E5=8C=85=E5=90=AB=20client=20=E5=92=8C=20server=20=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E7=9A=84=20pom.xml=20=E7=AD=89=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | Bin 0 -> 20 bytes .vscode/settings.json | 3 + client/pom.xml | 83 ++++++++++++++ client/src/main/java/com/example/App.java | 13 +++ client/src/test/java/com/example/AppTest.java | 20 ++++ client/target/classes/com/example/App.class | Bin 0 -> 537 bytes .../test-classes/com/example/AppTest.class | Bin 0 -> 469 bytes core/pom.xml | 39 +++++++ core/src/main/java/com/example/App.java | 13 +++ core/src/test/java/com/example/AppTest.java | 20 ++++ core/target/classes/com/example/App.class | Bin 0 -> 537 bytes .../test-classes/com/example/AppTest.class | Bin 0 -> 469 bytes pom.xml | 107 ++++++++++++++++++ server/pom.xml | 68 +++++++++++ server/src/main/java/com/example/App.java | 13 +++ server/src/test/java/com/example/AppTest.java | 20 ++++ server/target/classes/com/example/App.class | Bin 0 -> 537 bytes .../test-classes/com/example/AppTest.class | Bin 0 -> 469 bytes 18 files changed, 399 insertions(+) create mode 100644 .gitignore create mode 100644 .vscode/settings.json create mode 100644 client/pom.xml create mode 100644 client/src/main/java/com/example/App.java create mode 100644 client/src/test/java/com/example/AppTest.java create mode 100644 client/target/classes/com/example/App.class create mode 100644 client/target/test-classes/com/example/AppTest.class create mode 100644 core/pom.xml create mode 100644 core/src/main/java/com/example/App.java create mode 100644 core/src/test/java/com/example/AppTest.java create mode 100644 core/target/classes/com/example/App.class create mode 100644 core/target/test-classes/com/example/AppTest.class create mode 100644 pom.xml create mode 100644 server/pom.xml create mode 100644 server/src/main/java/com/example/App.java create mode 100644 server/src/test/java/com/example/AppTest.java create mode 100644 server/target/classes/com/example/App.class create mode 100644 server/target/test-classes/com/example/AppTest.class diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..8d9590aab8c74ec8d8a1c7b148bf592afa1acc12 GIT binary patch literal 20 bcmezWuY@6yp@<=!A(f$oL7#z_fr|kENfrdl literal 0 HcmV?d00001 diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..c5f3f6b --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "java.configuration.updateBuildConfiguration": "interactive" +} \ No newline at end of file diff --git a/client/pom.xml b/client/pom.xml new file mode 100644 index 0000000..1b4e8a3 --- /dev/null +++ b/client/pom.xml @@ -0,0 +1,83 @@ + + + 4.0.0 + + + com.example + game-parent + 1.0-SNAPSHOT + ../pom.xml + + + game-client + Game Client + http://www.example.com + + + + + + com.example + core + + + + + com.badlogicgames.gdx + gdx + + + com.badlogicgames.gdx + gdx-backend-lwjgl3 + + + com.badlogicgames.gdx + gdx-platform + natives-desktop + + + + + junit + junit + test + + + + + + + + + maven-compiler-plugin + + + + + maven-assembly-plugin + + + jar-with-dependencies + + + + com.example.client.DesktopLauncher + + + + + + make-assembly + package + + single + + + + + + + + \ No newline at end of file diff --git a/client/src/main/java/com/example/App.java b/client/src/main/java/com/example/App.java new file mode 100644 index 0000000..b6bcb1d --- /dev/null +++ b/client/src/main/java/com/example/App.java @@ -0,0 +1,13 @@ +package com.example; + +/** + * Hello world! + * + */ +public class App +{ + public static void main( String[] args ) + { + System.out.println( "Hello World!" ); + } +} diff --git a/client/src/test/java/com/example/AppTest.java b/client/src/test/java/com/example/AppTest.java new file mode 100644 index 0000000..22a94ca --- /dev/null +++ b/client/src/test/java/com/example/AppTest.java @@ -0,0 +1,20 @@ +package com.example; + +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +/** + * Unit test for simple App. + */ +public class AppTest +{ + /** + * Rigorous Test :-) + */ + @Test + public void shouldAnswerWithTrue() + { + assertTrue( true ); + } +} diff --git a/client/target/classes/com/example/App.class b/client/target/classes/com/example/App.class new file mode 100644 index 0000000000000000000000000000000000000000..b0b5fd6a67af8fd94d757ee3b49cbe3a807f028b GIT binary patch literal 537 zcmZuuOHaZ;5dM~jeOTos_*U=)9_-NrYGO=`hek~>c<{884KCSsn^KJaEInxA!5`p{ zGETvSV7Sce%n7sPln=p9P~td$9qaJls)Zp)#b5F>%V3$d6XlD zlJ`%xO_TwbAw#YC;LYSaNi4%byVbQ&Ld8IN&RpkZl!(B=8meSWkI83s3YOZvC1gT) z!GpGmbq423D5dN7I#&ILjZJJD*kY(m)aC&WcCgD}L@9?NSJmbsQ)HUQ1A0$ofoBH0 zqsOr?E@iq7la_mwN}&NVOJ4wF=tSG2Xi()+W|Z@XA244hW1C_+23=UD=u9tAUZKju oDhkv|!N(Ia>b;>@uDxSpMqtwj1UCsbBeAfDed;sRDQ3|41!E&_{Qv*} literal 0 HcmV?d00001 diff --git a/client/target/test-classes/com/example/AppTest.class b/client/target/test-classes/com/example/AppTest.class new file mode 100644 index 0000000000000000000000000000000000000000..887b9317e968de0abcb13e310f338b69a7573f9b GIT binary patch literal 469 zcmZvYK~KU!5QX2CLbX;w3Mxl$=)paBL`@nKPmLx@F!8pO4J>JQNxN15mM4t|e}F&A zI0X_eTxRy|n|!-(e*eCI09>Qz!C?p!lX3YjvPCL+v{(#fVLiAEt+{v=JQaG%AI5W; zScb-x(#qa2)cR*52KUxXq>mbQ1Ju!AXvRv*`!XBLd??1LWN61G5$QO>hmfp|6BUKbZGbM07<{o*E4JHzsRH>=rpyz0r>d_9>t$S2d%!6uHLVSB=tOC$ zdZajYM!kOiiJgz7?NhC6z{eidU^PH}pA^FZxel7^sTTDLbV<$< + + 4.0.0 + + + com.example + game-parent + 1.0-SNAPSHOT + ../pom.xml + + + + core + Game Core + http://www.example.com + + + + + + junit + junit + test + + + + + + + + + maven-compiler-plugin + + + + + \ No newline at end of file diff --git a/core/src/main/java/com/example/App.java b/core/src/main/java/com/example/App.java new file mode 100644 index 0000000..b6bcb1d --- /dev/null +++ b/core/src/main/java/com/example/App.java @@ -0,0 +1,13 @@ +package com.example; + +/** + * Hello world! + * + */ +public class App +{ + public static void main( String[] args ) + { + System.out.println( "Hello World!" ); + } +} diff --git a/core/src/test/java/com/example/AppTest.java b/core/src/test/java/com/example/AppTest.java new file mode 100644 index 0000000..22a94ca --- /dev/null +++ b/core/src/test/java/com/example/AppTest.java @@ -0,0 +1,20 @@ +package com.example; + +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +/** + * Unit test for simple App. + */ +public class AppTest +{ + /** + * Rigorous Test :-) + */ + @Test + public void shouldAnswerWithTrue() + { + assertTrue( true ); + } +} diff --git a/core/target/classes/com/example/App.class b/core/target/classes/com/example/App.class new file mode 100644 index 0000000000000000000000000000000000000000..b0b5fd6a67af8fd94d757ee3b49cbe3a807f028b GIT binary patch literal 537 zcmZuuOHaZ;5dM~jeOTos_*U=)9_-NrYGO=`hek~>c<{884KCSsn^KJaEInxA!5`p{ zGETvSV7Sce%n7sPln=p9P~td$9qaJls)Zp)#b5F>%V3$d6XlD zlJ`%xO_TwbAw#YC;LYSaNi4%byVbQ&Ld8IN&RpkZl!(B=8meSWkI83s3YOZvC1gT) z!GpGmbq423D5dN7I#&ILjZJJD*kY(m)aC&WcCgD}L@9?NSJmbsQ)HUQ1A0$ofoBH0 zqsOr?E@iq7la_mwN}&NVOJ4wF=tSG2Xi()+W|Z@XA244hW1C_+23=UD=u9tAUZKju oDhkv|!N(Ia>b;>@uDxSpMqtwj1UCsbBeAfDed;sRDQ3|41!E&_{Qv*} literal 0 HcmV?d00001 diff --git a/core/target/test-classes/com/example/AppTest.class b/core/target/test-classes/com/example/AppTest.class new file mode 100644 index 0000000000000000000000000000000000000000..887b9317e968de0abcb13e310f338b69a7573f9b GIT binary patch literal 469 zcmZvYK~KU!5QX2CLbX;w3Mxl$=)paBL`@nKPmLx@F!8pO4J>JQNxN15mM4t|e}F&A zI0X_eTxRy|n|!-(e*eCI09>Qz!C?p!lX3YjvPCL+v{(#fVLiAEt+{v=JQaG%AI5W; zScb-x(#qa2)cR*52KUxXq>mbQ1Ju!AXvRv*`!XBLd??1LWN61G5$QO>hmfp|6BUKbZGbM07<{o*E4JHzsRH>=rpyz0r>d_9>t$S2d%!6uHLVSB=tOC$ zdZajYM!kOiiJgz7?NhC6z{eidU^PH}pA^FZxel7^sTTDLbV<$< + + 4.0.0 + + + com.example + game-parent + 1.0-SNAPSHOT + pom + Game Parent + + + + core + client + server + + + + + UTF-8 + 21 + 21 + 1.12.1 + 4.13.2 + + + + + + + + com.example + core + ${project.version} + + + + + com.badlogicgames.gdx + gdx + ${gdx.version} + + + com.badlogicgames.gdx + gdx-backend-lwjgl3 + ${gdx.version} + + + com.badlogicgames.gdx + gdx-platform + ${gdx.version} + natives-desktop + + + + + junit + junit + ${junit.version} + test + + + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.11.0 + + ${maven.compiler.source} + ${maven.compiler.target} + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.3.0 + + + + + maven-clean-plugin + 3.3.2 + + + maven-resources-plugin + 3.3.1 + + + maven-jar-plugin + 3.3.0 + + + + + + \ No newline at end of file diff --git a/server/pom.xml b/server/pom.xml new file mode 100644 index 0000000..23c393e --- /dev/null +++ b/server/pom.xml @@ -0,0 +1,68 @@ + + + 4.0.0 + + + com.example + game-parent + 1.0-SNAPSHOT + ../pom.xml + + + server + Game Server + http://www.example.com + + + + + + com.example + core + + + + + junit + junit + test + + + + + + + + + maven-compiler-plugin + + + + + maven-assembly-plugin + + + jar-with-dependencies + + + + com.example.server.ServerLauncher + + + + + + make-assembly + package + + single + + + + + + + + \ No newline at end of file diff --git a/server/src/main/java/com/example/App.java b/server/src/main/java/com/example/App.java new file mode 100644 index 0000000..b6bcb1d --- /dev/null +++ b/server/src/main/java/com/example/App.java @@ -0,0 +1,13 @@ +package com.example; + +/** + * Hello world! + * + */ +public class App +{ + public static void main( String[] args ) + { + System.out.println( "Hello World!" ); + } +} diff --git a/server/src/test/java/com/example/AppTest.java b/server/src/test/java/com/example/AppTest.java new file mode 100644 index 0000000..22a94ca --- /dev/null +++ b/server/src/test/java/com/example/AppTest.java @@ -0,0 +1,20 @@ +package com.example; + +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +/** + * Unit test for simple App. + */ +public class AppTest +{ + /** + * Rigorous Test :-) + */ + @Test + public void shouldAnswerWithTrue() + { + assertTrue( true ); + } +} diff --git a/server/target/classes/com/example/App.class b/server/target/classes/com/example/App.class new file mode 100644 index 0000000000000000000000000000000000000000..b0b5fd6a67af8fd94d757ee3b49cbe3a807f028b GIT binary patch literal 537 zcmZuuOHaZ;5dM~jeOTos_*U=)9_-NrYGO=`hek~>c<{884KCSsn^KJaEInxA!5`p{ zGETvSV7Sce%n7sPln=p9P~td$9qaJls)Zp)#b5F>%V3$d6XlD zlJ`%xO_TwbAw#YC;LYSaNi4%byVbQ&Ld8IN&RpkZl!(B=8meSWkI83s3YOZvC1gT) z!GpGmbq423D5dN7I#&ILjZJJD*kY(m)aC&WcCgD}L@9?NSJmbsQ)HUQ1A0$ofoBH0 zqsOr?E@iq7la_mwN}&NVOJ4wF=tSG2Xi()+W|Z@XA244hW1C_+23=UD=u9tAUZKju oDhkv|!N(Ia>b;>@uDxSpMqtwj1UCsbBeAfDed;sRDQ3|41!E&_{Qv*} literal 0 HcmV?d00001 diff --git a/server/target/test-classes/com/example/AppTest.class b/server/target/test-classes/com/example/AppTest.class new file mode 100644 index 0000000000000000000000000000000000000000..887b9317e968de0abcb13e310f338b69a7573f9b GIT binary patch literal 469 zcmZvYK~KU!5QX2CLbX;w3Mxl$=)paBL`@nKPmLx@F!8pO4J>JQNxN15mM4t|e}F&A zI0X_eTxRy|n|!-(e*eCI09>Qz!C?p!lX3YjvPCL+v{(#fVLiAEt+{v=JQaG%AI5W; zScb-x(#qa2)cR*52KUxXq>mbQ1Ju!AXvRv*`!XBLd??1LWN61G5$QO>hmfp|6BUKbZGbM07<{o*E4JHzsRH>=rpyz0r>d_9>t$S2d%!6uHLVSB=tOC$ zdZajYM!kOiiJgz7?NhC6z{eidU^PH}pA^FZxel7^sTTDLbV<$< Date: Wed, 17 Sep 2025 10:33:19 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=BF=99=E9=87=8C=E5=86=99=E4=BD=A0?= =?UTF-8?q?=E7=9A=84=E6=8F=90=E4=BA=A4=E8=AF=B4=E6=98=8E=EF=BC=8C=E6=AF=94?= =?UTF-8?q?=E5=A6=82=EF=BC=9A=E4=BF=AE=E5=A4=8DXX=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/main/java/com/example/App.java | 8 +++----- client/target/classes/com/example/App.class | Bin 537 -> 534 bytes 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/client/src/main/java/com/example/App.java b/client/src/main/java/com/example/App.java index b6bcb1d..940ed32 100644 --- a/client/src/main/java/com/example/App.java +++ b/client/src/main/java/com/example/App.java @@ -4,10 +4,8 @@ package com.example; * Hello world! * */ -public class App -{ - public static void main( String[] args ) - { - System.out.println( "Hello World!" ); +public class App { + public static void main(String[] args) { + System.out.println("Hello 12!"); } } diff --git a/client/target/classes/com/example/App.class b/client/target/classes/com/example/App.class index b0b5fd6a67af8fd94d757ee3b49cbe3a807f028b..dc6c756d7d210f560ebae22777f7443bdd6f5b33 100644 GIT binary patch delta 30 mcmbQqGL2=zFHTO6)SR4r1w*6BY>b~+IT<(@xF-K)lmP&f_6Vc^ delta 48 zcmbQnGLvP(F9{xx)SR4rh4B2MoD@Ya21y2Kb_OX%2H}Yhg(oX9US{QH;9%gH{EJZr E08uv#asU7T From 5c31c80c070114aa944acecc7689478b9a6ebbb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=A0=E7=9A=84Gitea=E7=94=A8=E6=88=B7=E5=90=8D?= <你的邮箱> Date: Wed, 17 Sep 2025 15:36:19 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/example/MyGdxGame.java | 47 ++++++++++++++++++ .../classes/com/example/MyGdxGame.class | Bin 0 -> 970 bytes 2 files changed, 47 insertions(+) create mode 100644 client/src/main/java/com/example/MyGdxGame.java create mode 100644 client/target/classes/com/example/MyGdxGame.class diff --git a/client/src/main/java/com/example/MyGdxGame.java b/client/src/main/java/com/example/MyGdxGame.java new file mode 100644 index 0000000..4597011 --- /dev/null +++ b/client/src/main/java/com/example/MyGdxGame.java @@ -0,0 +1,47 @@ +package com.example; +import com.badlogic.gdx.ApplicationListener; +import com.badlogic.gdx.Gdx; +import com.badlogic.gdx.graphics.GL20; + +public class MyGdxGame implements ApplicationListener { + // 游戏初始化时调用 + @Override + public void create() { + // 加载资源、初始化游戏对象 + + } + + // 每次渲染时调用 + @Override + public void render() { + // 清空屏幕 + Gdx.gl.glClearColor(0, 0, 0, 1); + Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); + + // 游戏逻辑更新和渲染 + } + + // 窗口大小改变时调用 + @Override + public void resize(int width, int height) { + + } + + // 游戏暂停时调用(如Android上按下Home键) + @Override + public void pause() { + + } + + // 游戏恢复时调用 + @Override + public void resume() { + + } + + // 游戏退出时调用,释放资源 + @Override + public void dispose() { + + } +} \ No newline at end of file diff --git a/client/target/classes/com/example/MyGdxGame.class b/client/target/classes/com/example/MyGdxGame.class new file mode 100644 index 0000000000000000000000000000000000000000..7b4d08b13b0804b4e236ac4a55056767f41e2bc5 GIT binary patch literal 970 zcmah{+iuf95IyTAHcd=Q)0PA%CB1>uq8jm9u8PzsD8K_K?;CsNY~`D52LgWuFQ`25 z0elo<)`^^!1l7{+&dko4J!i(h|NQ&~;5i-}&=|IyD6qwZ2eB{gw_m#Mq{{NL-B4L3`O#h4}HNz2RxC=p9M?VNTv*p{!*H!^p2AV zo)KJ6MCgiS6&u(xu*tBwK$OIpxQzyb=J^b*yyz7vUc%#%bW*$9fBNLKiaWSx;4Z_? zLai&ACbn^(!Swu&FL=_4{D@j$SZDOL2dc~i6D{mgY?eYDv3ja8L_3vViGSJZ<$>~N z>1HDa)}zajklrYx%b1VTsmOF3kYTtojUyGRe2B)0BhIAiVXc_pi5ebuK?9&wrimML zQtN47CC{dl(OEwFfyy^BG?=vOc~Hkqvdw7%YFHzW{)Ym5ock2}7ieAr5}O%ty#T%; zChFDZchsxZs(FEC8Dy`&!Uc9T%-97A6HKpbyEtS7OXgdeC vrk69I(sF>qoCw21vNW